home *** CD-ROM | disk | FTP | other *** search
/ PC go! 2008 April / PCgo 2008-04 (DVD).iso / interface / contents / demoversionen_3846 / 13664 / files / Data1.cab / tcwapi10.h < prev    next >
Encoding:
Text File  |  2005-02-15  |  117.7 KB  |  4,396 lines

  1. '******************************************************************
  2. '*                                                                *
  3. '*                      TurboCAD for Windows                      *
  4. '*                   Copyright (c) 1993 - 2004                    *
  5. '*             International Microcomputer Software, Inc.         *
  6. '*                            (IMSI)                              *
  7. '*                      All rights reserved.                      *
  8. '*                                                                *
  9. '******************************************************************
  10. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  11. '                                                                 '
  12. '                TCWAPI70.H - Header file for Enable              '
  13. '                                                                 '
  14. '           This file was created at 17:01:52 on 09/29/00,        '
  15. '           by filter.exe, a program written by Pat Garner.       '
  16. '                                                                 '
  17. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  18.  
  19.  
  20. '//Description
  21. '//This function will launch the Enable debugger with an Enable Basic statement 
  22. '//(passed as a String) or load an Enable basic file (if the string ends with ".bas") into
  23. '//the debugger. 
  24. '//
  25. '//Input Parameters
  26. '//String script        A statement in Enable Basic or the name of an Enable Basic file
  27. '//
  28. '//Return Value
  29. '// None
  30. '//
  31. '//See Also
  32. '//    TCWBasicRun
  33. '//
  34. '//Coding Example
  35. '//    TCWBasicDebug "MsgBox" + Chr(34) + "Hello World!" + Chr(34)
  36. '//    TCWBasicDebug "test.bas"
  37. '//
  38. '//Declaration
  39. Declare Function TCWBasicDebug lib "DEBUGGER40" ( _  '//# Non-localizable string#
  40.     ByRef s As String _ 
  41. )
  42.  
  43.  
  44. '//Section
  45. '//APPLICATION - Miscellaneous Functions
  46.  
  47. '//Description
  48. '//This function will shutdown the application and exit.  All open drawings
  49. '//will be closed before exiting.  If any drawings have been changed, you will
  50. '//be prompted to save them before exiting.
  51. '//
  52. '//Input Parameters
  53. '//None
  54. '//
  55. '//Return Value
  56. '// None
  57. '//
  58. '//See Also
  59. '//
  60. '//Coding Example
  61. '//    TCWAppExit
  62. '//
  63. '//Declaration
  64. Declare Function TCWAppExit lib "TCAPI11" ()
  65.  
  66. '//Description
  67. '//This function will return the active window handle.  The active window is
  68. '//the currently active drawing window.
  69. '//
  70. '//Input Parameters
  71. '//None
  72. '//
  73. '//Return Value
  74. '//The handle of window as a long.
  75. '//
  76. '//See Also
  77. '//
  78. '//Coding Example
  79. '//    Dim hWindow As Long
  80. '//    hWindow = TCWActiveWindow()
  81. '//    ...
  82. '//
  83. '//Declaration
  84. Declare Function TCWActiveWindow lib "TCAPI11" () As Long
  85.  
  86. '//Description
  87. '//This function will launch an Enable Basic statement (passed as a String)
  88. '//or load and execute an Enable basic file (if the string ends with ".bas").
  89. '//
  90. '//Input Parameters
  91. '//String script    A statement in Enable Basic or the name of an Enable Basic file
  92. '//
  93. '//Return Value
  94. '//None
  95. '//
  96. '//See Also
  97. '//TCWBasicDebug
  98. '//
  99. '//Coding Example
  100. '//    TCWBasicRun "MsgBox" + Chr(34) + "Hello World!" + Chr(34)
  101. '//    TCWBasicRun "test.bas"
  102. '//
  103. '//Declaration
  104. Declare Function TCWBasicRun lib "TCAPI11" ( _ 
  105.     ByRef script As String _ 
  106. ) As Long
  107.  
  108. '//Section
  109. '//APPLICATION - Error Functions
  110.  
  111. '//Description
  112. '//This function will return a string for the last error that occurred in the script.
  113. '//
  114. '//The script is responsible for checking for errors after making TCADAPI calls.
  115. '//If the API call was supposed to return a handle to drawing, graphic, ...
  116. '//you should check for NULL and call TCWLastErrorGet if true.  If a non-null handle
  117. '//was returned, then the call succeeded and you don't need to check for errors.
  118. '//For Api calls that return status, 0 signifies success.  Non-zero status signifies failure
  119. '//and you should call TCWLastErrorGet to get the error text.
  120. '//
  121. '//Input Parameters
  122. '//String errorstring    Buffer to return error string in
  123. '//
  124. '//Return Value
  125. '//Error string in string passed to the function.  Function returns 0 is successful and non-zero if
  126. '//their was no error to retrieve.
  127. '//
  128. '//See Also
  129. '//TCWClearError
  130. '//
  131. '//Coding Example
  132. '//    Dim result As Long
  133. '//    Dim errtext As String
  134. '//  Dim gCircle As Long
  135. '//    ...
  136. '//    gCircle = TCWCircleCenterAndPoint(xc, yc, zc, xp, yp, zp)
  137. '//  if (gCircle = NULL) then
  138. '//        result = TCWLastErrorGet (errtext)
  139. '//        MsgBox errtext
  140. '//        'Terminate the program
  141. '//        Stop
  142. '//    end if
  143. '//    ...
  144. '//
  145. '//Declaration
  146. Declare Function TCWLastErrorGet lib "TCAPI11" ( _ 
  147.     ByRef pszErrorString As String _ 
  148. ) As Long
  149.  
  150. '//Description
  151. '//This function will clear the error info in TCADAPI.  You can use this function after
  152. '//you've checked the previous TCADAPI function status.  TCADAPI will clear
  153. '//the error information structure at the beginning of each API function so previous
  154. '//errors will be lost if you don't use TCWLastErrorGet.
  155. '//
  156. '//Input Parameters
  157. '//None
  158. '//
  159. '//Return Value
  160. '//None
  161. '//
  162. '//See Also
  163. '//
  164. '//Coding Example
  165. '//    ...
  166. '//    TCWClearError
  167. '//
  168. '//Declaration
  169. Declare Function TCWClearError lib "TCAPI11" ()
  170.  
  171. '//Section
  172. '//APPLICATION - Get and Set Property Functions
  173.  
  174. '//Description
  175. '//This function will return the value of the property that has been
  176. '//requested.  This function is written in Basic due to problems with Enable
  177. '//not supporting Variants with DLLs.
  178. '//
  179. '//Input Parameters
  180. '//String propertyname        name of property look up
  181. '//
  182. '//AVAILABLE PROPERTIES:        DESCRIPTION:
  183. '//"ColorButtons"            buttons are color or black and white
  184. '//"EditBar"                    viewing of the EditBar
  185. '//"LargeButtons"            buttons are large or small
  186. '//"Organization"             organization name
  187. '//"OpenReadOnly"            open files as read only
  188. '//"PromptForSummaryInfo"    prompting for summary information on save
  189. '//"Rulers"                    viewing of Rulers
  190. '//"ScrollBars"                viewing of Scroll Bars
  191. '//"StatusBar"                viewing of Status Bar
  192. '//"ShowTooltips"            show tool tips
  193. '//"SaveDesktopOnExit"        save desktop settings on exit
  194. '//"UserName"                username
  195. '//"ZoomFactor"                what factor to zoom when zooming in/out
  196. '//
  197. '//Return Value
  198. '//Value of property requested.
  199. '//
  200. '//AVAILABLE PROPERTIES:        VALUE RETURNED:
  201. '//"ColorButtons"            -1 if color buttons set, 0 if not set
  202. '//"EditBar"                    -1 if displayed, 0 if not displayed
  203. '//"LargeButtons"            -1 large buttons is set, 0 if not set
  204. '//"Organization"             organization name as a string
  205. '//"OpenReadOnly"            -1 if set, 0 if not set
  206. '//"PromptForSummaryInfo"    -1 if set, 0 if not set
  207. '//"Rulers"                    -1 if displayed, 0 if not displayed
  208. '//"ScrollBars"                -1 if displayed, 0 if not displayed
  209. '//"StatusBar"                -1 if displayed, 0 if not displayed
  210. '//"ShowTooltips"            -1 if displayed, 0 if not displayed
  211. '//"SaveDesktopOnExit"        -1 if set, 0 if not set
  212. '//"UserName"                username as a string
  213. '//"ZoomFactor"                the zoom factor as a double
  214. '//
  215. '//See Also
  216. '//TCWAppPropertySet
  217. '//
  218. '//Coding Example
  219. '//
  220. '//        zoomValue = TCWAppPropertyGet("ZoomFactor")
  221. '//
  222. '//Declaration
  223. '//Declare Function TCWAppPropertyGet ( _ 
  224. '//    ByRef propertyname As String _ 
  225. '//)As Variant
  226.  
  227. '//Description
  228. '//This function will set the property with the specified value.
  229. '//
  230. '//Input parameters
  231. '//String propertyname        name of property to modify 
  232. '//Variant value                value to set to 
  233. '//
  234. '//AVAILABLE PROPERTIES:        VALUE:
  235. '//"ColorButtons"            1 if color, 0 if black and white (Integer)
  236. '//"EditBar"                    1 if displayed, 0 if not displayed (Integer)
  237. '//"LargeButtons"            1 if large buttons, 0 if small (Integer)
  238. '//"Organization"             organization name (String)
  239. '//"OpenReadOnly"            1 if read only, 0 if not (Integer)
  240. '//"PromptForSummaryInfo"    1 if prompt, 0 if no prompt (Integer)
  241. '//"Rulers"                    1 if displayed, 0 if not (Integer)
  242. '//"ScrollBars"                1 if displayed, 0 if not (Integer)
  243. '//"StatusBar"                1 if displayed, 0 if not (Integer)
  244. '//"ShowTooltips"            1 if show tips, 0 if not (Integer)
  245. '//"SaveDesktopOnExit"        1 if save on exit, 0 if not (Integer)
  246. '//"UserName"                username (String)
  247. '//"ZoomFactor"                zoom factor (Double)
  248. '//
  249. '//Return Value
  250. '// 0 if no errors
  251. '// non-zero if errors, use TCWLastErrorGet to retrieve error string
  252. '//
  253. '//See Also
  254. '// TCWAppPropertyGet
  255. '//
  256. '//Coding Example
  257. '//
  258. '//        result = TCWAppPropertySet("ZoomFactor",10.0)
  259. '//
  260. '//Declaration
  261. '//Declare Function TCWAppPropertySet ( _ 
  262. '//    ByRef propertyname As String, _ 
  263. '//    ByVal value As Variant _ 
  264. '//)As Long
  265.  
  266. '//Section
  267. '//APPLICATION - Drawing Management Functions
  268.  
  269. '//Description
  270. '//This function will create a new TurboCAD drawing.
  271. '//
  272. '//Input Parameters
  273. '//None
  274. '//
  275. '//Return Value
  276. '//The handle to the new drawing as a long.  If return value is NULL, then the 
  277. '//drawing was not created.  Use TCWLastErrorGet to retrieve the error string.
  278. '//
  279. '//See Also
  280. '//
  281. '//Coding Example
  282. '//    Dim hDrawing As Long
  283. '//    hDrawing = TCWDrawingNew()
  284. '//    if (hDrawing = NULL) then
  285. '//        'check error
  286. '//        ...
  287. '//    end if
  288. '//    ...
  289. '//
  290. '//Declaration
  291. Declare Function TCWDrawingNew lib "TCAPI11" () As Long
  292.  
  293. '//Description
  294. '//This function will open a drawing in any TurboCAD supported format.  The format
  295. '//is based on the file extension (.tcw, .dxf, .dwg...).
  296. '//
  297. '//Input Parameters
  298. '//String drawingname        name of drawing to open
  299. '//
  300. '//Return Value
  301. '//The handle to the opened drawing as a long.  If return value is NULL, then the
  302. '//drawing was not opened.  Use TCWLastErrorGet to retrieve the error string.
  303. '//
  304. '//See Also
  305. '//
  306. '//Coding Example
  307. '//    Dim hDrawing As Long
  308. '//    hDrawing = TCWDrawingOpen("c:\mydrawings\pipes.tcw")
  309. '//    if (hDrawing = NULL) then
  310. '//        'check error
  311. '//        ...
  312. '//
  313. '//Declaration
  314. Declare Function TCWDrawingOpen lib "TCAPI11" ( _ 
  315.     ByRef dname As String _ 
  316. ) As Long
  317.  
  318. '//Description
  319. '//This function will close the current drawing.  If the file has changed since
  320. '//it was last saved, the value of savechanges will determine if the file is saved
  321. '//first before closing.
  322. '//
  323. '//Input Parameters
  324. '//Long savechanges        1 if save changes before closing, 0 to not save changes
  325. '//
  326. '//Return Value
  327. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  328. '//error string.
  329. '// 
  330. '//See Also
  331. '//
  332. '//Coding Example
  333. '//    ...
  334. '//    result = TCWDrawingClose(1)
  335. '//  if (result <> 0) then
  336. '//        'check error
  337. '//        ...
  338. '//
  339. '//Declaration
  340. Declare Function TCWDrawingClose lib "TCAPI11" ( _ 
  341.     ByVal savechanges As Long _ 
  342. ) As Long
  343.  
  344. '//Description
  345. '//This function will save the current drawing to disk using the file and folder
  346. '//name that was previously used.  If this is the first time the file has been
  347. '//saved, you will be prompted with the SaveAs dialog, prompting you for a name
  348. '//and location to save the file.  If you have Prompt for Summary Info in the
  349. '//Options|Program Setup|General property sheet selected, you will be prompted to
  350. '//input summary information.
  351. '//
  352. '//Input Parameters
  353. '//None
  354. '//
  355. '//Return Value
  356. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  357. '//error string.
  358. '//
  359. '//See Also
  360. '//TCWDrawingSaveAs
  361. '//
  362. '//Coding Example
  363. '//    ...
  364. '//    result = TCWDrawingSave()
  365. '//    if (result <> 0)
  366. '//        'check error
  367. '//    ...
  368. '//
  369. '//Declaration
  370. Declare Function TCWDrawingSave lib "TCAPI11" () As Long
  371.  
  372. '//Description
  373. '// This function will save the current drawing to disk using a file name and folder
  374. '// you specify.  The SaveAs dialog box will be displayed and you can input name,
  375. '// location, etc.  If you have Prompt for Summary Info in the
  376. '// Options|Program Setup|General property sheet selected, you will be prompted to
  377. '// input summary information. Set saveselection to True if you only want to save
  378. '// the current selection to the file.
  379. '//
  380. '//Input Parameters
  381. '//String drawingname        new name of drawing
  382. '//Integer saveselection        True if you want to save selection, false for drawing
  383. '//
  384. '//Return Value
  385. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  386. '//error string.
  387. '//
  388. '//See Also
  389. '//TCWDrawingSave
  390. '//
  391. '//Coding Example
  392. '//    ...
  393. '//    result = TCWDrawingSaveAs("newdrawing.tcw")
  394. '//    if (result <> 0) then
  395. '//        'check error
  396. '//        ...
  397. '//
  398. '//Declaration
  399. Declare Function TCWDrawingSaveAs lib "TCAPI11" ( _ 
  400.     ByRef dname As String, _ 
  401.     ByVal saveselection As Long _ 
  402. ) As Long
  403.  
  404. '//Description
  405. '//This function will return the name of the drawing associated with the active
  406. '//drawing.  If the drawing is a new drawing that has not been saved, this function
  407. '//will return the drawing title (e.g. Drawing1).  This function can be used with TCWDrawingAt and TCWDrawingCount.  
  408. '//If you have only one drawing open, you can use TCWDrawingName(name) and it will 
  409. '//return the name of the current drawing.  If you have multiple drawings open, 
  410. '//use TCWDrawingCount to find out how many are open, then use TCWDrawingAt and TCWDrawingName 
  411. '//to cycle through the drawings to get the name of each.
  412. '//
  413. '//Input Parameters
  414. '//String drawingname        buffer for drawing name
  415. '//
  416. '//Return Value
  417. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  418. '//error string.
  419. '//
  420. '//See Also
  421. '//TCWDrawingCount, TCWDrawingAt
  422. '//
  423. '//Coding Example
  424. '//    Dim dCount As Long
  425. '//    Dim hDrawing As Long
  426. '//    Dim i As Long
  427. '//    Dim dName As String
  428. '//    dCount = TCWDrawingCount()
  429. '//    if (dCount = 0) then
  430. '//        MsgBox "No drawings open."
  431. '//        Stop
  432. '//    end if
  433. '//    for i = 0 to dCount - 1
  434. '//        hDrawing = TCWDrawingAt(i)
  435. '//        TCWDrawingName dName
  436. '//        MsgBox dName
  437. '//    next i
  438. '//    ...
  439. '//
  440. '//Declaration
  441. Declare Function TCWDrawingName lib "TCAPI11" ( _ 
  442.     ByRef dname As String _ 
  443. ) As Long
  444.  
  445. '//Description
  446. '//This function will activate the drawing specified.  This function is used
  447. '//with TCWDrawingCount to get the number of drawings open in the application.
  448. '//If you have multiple drawings open, you can use TCWDrawingCount to get the
  449. '//number of drawings, then use TCWDrawingAt to change the active drawing.  The
  450. '//index is 0 based, so you can cycle through 0 to count-1 drawings.
  451. '//
  452. '//Input Parameters
  453. '//Long index        number associated with the open drawing
  454. '//
  455. '//Return Value
  456. '//The handle to the drawing as a long.
  457. '//
  458. '//See Also
  459. '//TCWDrawingName, TCWDrawingCount
  460. '//
  461. '//Coding Example
  462. '//    Dim dCount As Long
  463. '//    Dim i As Long
  464. '//    Dim hDrawing As Long
  465. '//    dCount = TCWDrawingCount()
  466. '//    for i = 0 to dCount - 1
  467. '//        hDrawing = TCWDrawingAt(i)
  468. '//        ...
  469. '//    next i
  470. '//    ...
  471. '//
  472. '//Declaration
  473. Declare Function TCWDrawingAt lib "TCAPI11" ( _ 
  474.     ByVal index As Long _ 
  475. ) As Long
  476.  
  477. '//Description
  478. '//This function will return the number of open drawings.  Used with 
  479. '//TCWDrawingName and TCWDrawingAt to cycle through the open drawings.
  480. '//
  481. '//Input Parameters
  482. '//None
  483. '//
  484. '//Return Value
  485. '//Number of open drawings in TurboCAD as a long.
  486. '//
  487. '//See Also
  488. '//TCWDrawingName, TCWDrawingAt
  489. '//
  490. '//Coding Example
  491. '//    Dim dCount As Long
  492. '//    Dim i As Long
  493. '//    Dim hDrawing As Long
  494. '//    dCount = TCWDrawingCount()
  495. '//    for i = 0 to dCount - 1
  496. '//        hDrawing = TCWDrawingAt(i)
  497. '//        ...
  498. '//    next i
  499. '//    ...
  500. '//
  501. '//Declaration
  502. Declare Function TCWDrawingCount lib "TCAPI11" () As Long
  503.  
  504. '//Description
  505. '//This function will print the current drawing.  Set showdialog to TRUE if
  506. '//you want to see the print dialog box and have access to the page setup
  507. '//parameters.
  508. '//
  509. '//Input Parameters
  510. '//Long showdialog            1 to show print dialog box, 0 if no print dialog box
  511. '//
  512. '//Return Value
  513. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  514. '//error string.
  515. '//
  516. '//See Also
  517. '//
  518. '//Coding Example
  519. '//    ...
  520. '//    result = TCWDrawingPrint(0)
  521. '//    ...
  522. '//
  523. '//Declaration
  524. Declare Function TCWDrawingPrint lib "TCAPI11" ( _ 
  525.     ByVal showdialog As Long _ 
  526. ) As Long
  527.  
  528. '//Description
  529. '//This function will return the handle of the active drawing.
  530. '//
  531. '//Input Parameters
  532. '//None
  533. '//
  534. '//Return Value
  535. '//Handle of active drawing as a Long.  If NULL, then no active drawing.  If you
  536. '//believe this should have returned a drawing handle, use TCWLastErrorGet to 
  537. '//retrieve the error string.
  538. '//
  539. '//See Also
  540. '//
  541. '//Coding Example
  542. '//    Dim hDrawing As Long
  543. '//    hDrawing = TCWDrawingActive()
  544. '//    if (hDrawing = NULL) then
  545. '//        Msgbox "No active drawing".
  546. '//    ...
  547. '//
  548. '//Declaration
  549. Declare Function TCWDrawingActive lib "TCAPI11" () As Long
  550.  
  551. '//Section
  552. '//APPLICATION - Undo and Redo Functions
  553.  
  554. '//Description
  555. '//This function will delete all the undo records in the current drawing.  You will
  556. '//not be able to Redo any previous actions after making this call.
  557. '//
  558. '//Input Parameters
  559. '//None
  560. '//
  561. '//Return Value
  562. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  563. '//error string.
  564. '//
  565. '//See Also
  566. '//TCWUndo, TCWRedo
  567. '//
  568. '//Coding Example
  569. '//    ...
  570. '//    result = TCWUndoClear()
  571. '//    ...
  572. '//
  573. '//Declaration
  574. Declare Function TCWUndoClear lib "TCAPI11" () As Long
  575.  
  576. '//Description
  577. '//This function will reverse the last n changes in the current drawing.
  578. '//
  579. '//Input Parameters
  580. '//long n        number of changes to undo
  581. '//
  582. '//Return Value
  583. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  584. '//error string.
  585. '//
  586. '//See Also
  587. '//TCWUndoClear, TCWRedo
  588. '//
  589. '//Coding Example
  590. '//    ...
  591. '//    result = TCWUndo(2) 'undo last 2 operations
  592. '//
  593. '//Declaration
  594. Declare Function TCWUndo lib "TCAPI11" ( _ 
  595.     ByVal n As Long _ 
  596. ) As Long
  597.  
  598. '//Description
  599. '//This function will reverse the effect of the last undo.
  600. '//
  601. '//Input Parameters
  602. '//None
  603. '//
  604. '//Return Value
  605. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  606. '//error string.
  607. '//
  608. '//See Also
  609. '//TCWUndoClear, TCWUndo
  610. '//
  611. '//Coding Example
  612. '//    ...
  613. '//    result = TCWRedo() 'oops - get it back!
  614. '//
  615. '//Declaration
  616. Declare Function TCWRedo lib "TCAPI11" () As Long
  617.  
  618. '//Section
  619. '//DRAWING - Selection Functions 
  620.  
  621. '//Description
  622. '//This function selects the  all graphics in the drawing.
  623. '//
  624. '//Input Parameters
  625. '//None
  626. '//
  627. '//Return Value
  628. '//0 if no errors.  There was at least one graphic to select.
  629. '//Non-zero if errors or no graphics to select. Use TCWLastErrorGet to see if there
  630. '//was an error.
  631. '//
  632. '//See Also
  633. '//TCWDeselectAll
  634. '//
  635. '//Coding Example
  636. '//    ...
  637. '//    result = TCWSelectAll()
  638. '//    if (result = 0) then
  639. '//        'change all graphics to have PenColor Red
  640. '//        ...
  641. '//
  642. '//Declaration
  643. Declare Function TCWSelectAll lib "TCAPI11" () As Long
  644.  
  645. '//Description
  646. '//This function will deselect all selected graphics.
  647. '//
  648. '//Input Parameters
  649. '//None
  650. '//
  651. '//Return Value
  652. '//0 if no errors.  At least one graphic was deselected.
  653. '//Non-zero if errors or no graphics to deselect. Use TCWLastErrorGet see if there was
  654. '//an error.
  655. '//
  656. '//See Also
  657. '//TCWSelectAll
  658. '//
  659. '//Coding Example
  660. '//    ...
  661. '//    result = TCWDeselectAll()
  662. '//    ...
  663. '//
  664. '//Declaration
  665. Declare Function TCWDeselectAll lib "TCAPI11" () As Long
  666.  
  667. '//Description
  668. '//This function will delete all selected graphics.
  669. '//
  670. '//Input Parameters
  671. '//None
  672. '//
  673. '//Return Value
  674. '//0 if no errors.  At least one graphic was deleted.
  675. '//Non-zero if errors or no graphics to delete.  Use TCWLastErrorGet to see if there was
  676. '//an error.
  677. '//
  678. '//See Also
  679. '//TCWClearAll
  680. '//
  681. '//Coding Example
  682. '//    'select all graphics with type = circle
  683. '//     g = TCWSelectByQuery("Type = Circle/Ellipse")
  684. '//     result = TCWClearSelection()
  685. '//    ...
  686. '//
  687. '//Declaration
  688. Declare Function TCWClearSelection lib "TCAPI11" () As Long
  689.  
  690. '//Description
  691. '//This function will delete all graphics in the current drawing.
  692. '//
  693. '//This deletes every graphic, not just what is selected.  To only delete
  694. '//selected graphics, see TCWClearSelection.
  695. '//
  696. '//Input Parameters
  697. '//None
  698. '//
  699. '//Return Value
  700. '//0 if no errors.  At least one graphic was deleted.
  701. '//Non-zero if errors or no graphics to delete.  Use TCWLastErrorGet to see if there was
  702. '//an error.
  703. '//
  704. '//See Also
  705. '//TCWClearSelection
  706. '//
  707. '//Coding Example
  708. '//    ...
  709. '//    result = TCWClearAll()
  710. '//    ...
  711. '//
  712. '//Declaration
  713. Declare Function TCWClearAll lib "TCAPI11" () As Long
  714.  
  715. '//Description
  716. '//This function will delete all construction graphics in the current drawing.
  717. '//
  718. '//Input Parameters
  719. '//None
  720. '//
  721. '//Return Value
  722. '//0 if no errors.  At least one graphic was deleted.
  723. '//Non-zero if errors or no graphics to delete.  Use TCWLastErrorGet to see if there was
  724. '//an error.
  725. '//
  726. '//See Also
  727. '//
  728. '//Coding Example
  729. '//    ...
  730. '//    result = TCWClearAllConstructions()
  731. '//    ...
  732. '//
  733. '//Declaration
  734. Declare Function TCWClearAllConstructions lib "TCAPI11" () As Long
  735.  
  736. '//Description
  737. '//This function will select graphics in the drawing based on specified criteria.  
  738. '//An empty query is equivalent to SELECTED.  Use TCWSelectionCount and TCWSelectionAt
  739. '//to cycle through the selected graphics.
  740. '//
  741. '//The query language is defined as follows:
  742. '//
  743. '//"query"      -> "expr"
  744. '//"expr"       -> "expr" OR "expr" | "expr" AND "expr" | ("expr") | NOT "expr" | "atom"
  745. '//"atom"       -> ALL | SELECTED | "field_name" "relation" "value"
  746. '//"rel"        -> = | <> | < | <= | > | >=
  747. '//"field_name" -> "string" | "any_string"
  748. '//"value"      -> "string" | "any_string"
  749. '//"string"     -> string without spaces which is not a keyword and doesn't have any reserved characters
  750. '//"any_string" -> string without any double quote marks, may have spaces
  751. '//
  752. '//Keywords for query are:
  753. '//  ALL, SELECTED, OR, AND, NOT
  754. '//
  755. '//Reserved characters are:
  756. '//  =, <, >, ", (, )
  757. '//
  758. '//Precedence (in descending order):
  759. '//   ()
  760. '//   NOT
  761. '//   AND
  762. '//   OR
  763. '//
  764. '//Input Parameters
  765. '//String s            string for search
  766. '//
  767. '//Return Value
  768. '//First graphic in the selection as a Long.  
  769. '//
  770. '//See Also
  771. '//
  772. '//Coding Example
  773. '//    Dim g As Long
  774. '//  'This query adds all elements from the electrical layer to the current selection
  775. '//  g = TCWSelectByQuery("SELECTED OR Layer = electrical")
  776. '//    if (g = NULL) then
  777. '//        MsgBox "No graphics met criteria".
  778. '//        Stop
  779. '//        ...
  780. '//
  781. '//Declaration
  782. Declare Function TCWSelectByQuery lib "TCAPI11" ( _ 
  783.     ByRef s As String _ 
  784. ) As Long
  785.  
  786. '//Description
  787. '//This function will return a count of the number of graphics currently
  788. '//selected in the drawing.
  789. '//
  790. '//Input Parameters
  791. '//None
  792. '//
  793. '//Return Value
  794. '//The number of graphics that are currently selected as a Long.
  795. '//
  796. '//See Also
  797. '//TCWSelection, TCWSelectByQuery
  798. '//
  799. '//Coding Example
  800. '//
  801. '//Declaration
  802. Declare Function TCWSelectionCount lib "TCAPI11" () As Long
  803.  
  804. '//Description
  805. '//This function will return the handle of the requested graphic in the drawing.  The index
  806. '//should be a number from 0 to the value-1 returned by TCWSelectionCount.
  807. '//
  808. '//Input Parameters
  809. '//Long index            requested select graphic index
  810. '//
  811. '//Return Value
  812. '//The handle of the graphic as a Long.
  813. '//
  814. '//See Also
  815. '//TCWSelectionCount
  816. '//
  817. '//Coding Example
  818. '//
  819. '//Declaration
  820. Declare Function TCWSelectionAt lib "TCAPI11" ( _ 
  821.     ByVal index As Long _ 
  822. ) As Long
  823.  
  824. '//Section
  825. '//DRAWING - Construction Line Creation Functions
  826.  
  827. '//These graphic creation functions add the graphic to the drawing.  
  828. '//Do not use the graphic handle returned from these functions with
  829. '//TCWGraphicAppend to append to the drawing or another graphic.
  830. '//
  831. '//All construction lines and circles are put on a CONSTRUCTION layer.
  832.  
  833. '//Description
  834. '//This function will draw a construction line at the specified angle.
  835. '//
  836. '//Input Parameters
  837. '//Double x0            X coordinate of the first point
  838. '//Double y0            Y coordinate of the first point
  839. '//Double z0            Z coordinate of the first point 
  840. '//Double x1            X coordinate of the second point
  841. '//Double y1            Y coordinate of the second point
  842. '//Double z1            Z coordinate of the second point
  843. '//
  844. '//Return Value
  845. '//Returns the handle to the construction line as a long.
  846. '//
  847. '//See Also
  848. '//
  849. '//Coding Example
  850. '//    Dim hConstr As Long
  851. '//    ...
  852. '//    hConstr = TCWConstructionAngularLine(x1, y1, z1, x2, y2, z2)
  853. '//    if (hConstr = NULL) then
  854. '//        'check error
  855. '//        ...
  856. '//
  857. '//Declaration
  858. Declare Function TCWConstructionAngularLine lib "TCAPI11" ( _ 
  859.     ByVal x0 As Double, _ 
  860.     ByVal y0 As Double, _ 
  861.     ByVal z0 As Double, _ 
  862.     ByVal x1 As Double, _ 
  863.     ByVal y1 As Double, _ 
  864.     ByVal z1 As Double _ 
  865. ) As Long
  866.  
  867. '//Description
  868. '//This function will draw a horizontal construction line.
  869. '//
  870. '//Input Parameters
  871. '//Double x0            X coordinate of point on the line 
  872. '//Double y0            Y coordinate of point on the line 
  873. '//Double z0            Z coordinate of point on the line 
  874. '//
  875. '//Return Value
  876. '//Returns the handle to the construction line as a Long.
  877. '//
  878. '//See Also
  879. '//
  880. '//Coding Example
  881. '//    Dim hConstr As Long
  882. '//    Dim xc As Double
  883. '//    Dim yc As Double
  884. '//    'get center of view for construction line placement
  885. '//    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  886. '//    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
  887. '//    hConstr = TCWConstructionHorizontalLine(xc, yc, 0.0)
  888. '//    if (hConstr = NULL) then
  889. '//        'check error
  890. '//        ...
  891. '//
  892. '//Declaration
  893. Declare Function TCWConstructionHorizontalLine lib "TCAPI11" ( _ 
  894.     ByVal x0 As Double, _ 
  895.     ByVal y0 As Double, _ 
  896.     ByVal z0 As Double _ 
  897. ) As Long
  898.  
  899. '//Description
  900. '//This function will draw a vertical construction line.
  901. '//
  902. '//Input Parameters
  903. '//Double x0            X coordinate of point on the line 
  904. '//Double y0            Y coordinate of point on the line 
  905. '//Double z0            Z coordinate of point on the line 
  906. '//
  907. '//Return Value
  908. '//Returns the handle to the construction line as a Long.
  909. '//
  910. '//See Also
  911. '//
  912. '//Coding Example
  913. '//    Dim hConstr As Long
  914. '//    Dim xc As Double
  915. '//    Dim yc As Double
  916. '//    'get center of view for construction line placement
  917. '//    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  918. '//    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
  919. '//    hConstr = TCWConstructionVerticalLine(xc, yc, 0.0)
  920. '//    if (hConstr = NULL) then
  921. '//        'check error
  922. '//        ...
  923. '//
  924. '//Declaration
  925. Declare Function TCWConstructionVerticalLine lib "TCAPI11" ( _ 
  926.     ByVal x0 As Double, _ 
  927.     ByVal y0 As Double, _ 
  928.     ByVal z0 As Double _ 
  929. ) As Long
  930.  
  931. '//Description
  932. '//This function will draw a construction circle defined by its center point
  933. '//and a point on its perimeter.
  934. '//
  935. '//Input Parameters
  936. '//Double x0            X coordinate of the center point 
  937. '//Double y0            Y coordinate of the center point 
  938. '//Double z0            Z coordinate of the center point 
  939. '//Double x1            X coordinate of the perimeter point
  940. '//Double y1            Y coordinate of the perimeter point 
  941. '//Double z1            Z coordinate of the perimeter point 
  942. '//
  943. '//Return Value
  944. '//Returns the handle to the construction line as a Long.
  945. '//
  946. '//See Also
  947. '//
  948. '//Coding Example
  949. '//    Dim hConstr As Long
  950. '//    Dim xc As Double
  951. '//    Dim yc As Double
  952. '//    'get center of view for construction circle placement
  953. '//    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  954. '//    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
  955. '//    hConstr = TCWConstructionCenterAndPointCircle(xc, yc, 0.0, xc+2#, yc+2#, 0.0)
  956. '//    if (hConstr = NULL) then
  957. '//        'check error
  958. '//        ...
  959. '//
  960. '//Declaration
  961. Declare Function TCWConstructionCenterAndPointCircle lib "TCAPI11" ( _ 
  962.     ByVal x0 As Double, _ 
  963.     ByVal y0 As Double, _ 
  964.     ByVal z0 As Double, _ 
  965.     ByVal x1 As Double, _ 
  966.     ByVal y1 As Double, _ 
  967.     ByVal z1 As Double _ 
  968. ) As Long
  969.  
  970. '//Description
  971. '//This function will draw a construction circle that passes through two defined
  972. '//points 180 degrees apart.
  973. '//
  974. '//Input Parameters
  975. '//Double x0            X coordinate of the first point 
  976. '//Double y0            Y coordinate of the first point 
  977. '//Double z0            Z coordinate of the first point 
  978. '//Double x1            X coordinate of the second point
  979. '//Double y1            Y coordinate of the second point
  980. '//Double z1            Z coordinate of the second point
  981. '//
  982. '//Return Value
  983. '//Returns the handle to the construction line as a Long.
  984. '//
  985. '//See Also
  986. '//
  987. '//Coding Example
  988. '//    Dim hConstr As Long
  989. '//    Dim xc As Double
  990. '//    Dim yc As Double
  991. '//    'get center of view for construction circle placement
  992. '//    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  993. '//    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2
  994. '//    hConstr = TCWConstructionDoublePointCircle(xc-2#, yc-2#, 0.0, xc+2#, yc+2#, 0.0)
  995. '//    if (hConstr = NULL) then
  996. '//        'check error
  997. '//        ...
  998. '//
  999. '//Declaration
  1000. Declare Function TCWConstructionDoublePointCircle lib "TCAPI11" ( _ 
  1001.     ByVal x0 As Double, _ 
  1002.     ByVal y0 As Double, _ 
  1003.     ByVal z0 As Double, _ 
  1004.     ByVal x1 As Double, _ 
  1005.     ByVal y1 As Double, _ 
  1006.     ByVal z1 As Double _ 
  1007. ) As Long
  1008.  
  1009. '//Description
  1010. '//This function will draw a construction circle that passes through three
  1011. '//defined points.
  1012. '//
  1013. '//Input Parameters
  1014. '//Double x0            X coordinate of the first point 
  1015. '//Double y0            Y coordinate of the first point 
  1016. '//Double z0            Z coordinate of the first point 
  1017. '//Double x1            X coordinate of the second point
  1018. '//Double y1            Y coordinate of the second point
  1019. '//Double z1            Z coordinate of the second point
  1020. '//Double x2            X coordinate of the third point 
  1021. '//Double y2            Y coordinate of the third point 
  1022. '//Double z2            Z coordinate of the third point 
  1023. '//
  1024. '//Return Value
  1025. '//Returns the handle to the construction line as a Long.
  1026. '//
  1027. '//See Also
  1028. '//
  1029. '//Coding Example
  1030. '//    Dim hConstr As Long
  1031. '//    Dim xc As Double
  1032. '//    Dim yc As Double
  1033. '//    'get center of view for construction circle placement
  1034. '//    hConstr = TCWConstructionTriplePointCircle(1#, 1#, 0.0, 2#, 2#, 0.0, 3#,3#, 0.0)
  1035. '//    if (hConstr = NULL) then
  1036. '//        'check error
  1037. '//        ...
  1038. '//
  1039. '//Declaration
  1040. Declare Function TCWConstructionTriplePointCircle lib "TCAPI11" ( _ 
  1041.     ByVal x0 As Double, _ 
  1042.     ByVal y0 As Double, _ 
  1043.     ByVal z0 As Double, _ 
  1044.     ByVal x1 As Double, _ 
  1045.     ByVal y1 As Double, _ 
  1046.     ByVal z1 As Double, _ 
  1047.     ByVal x2 As Double, _ 
  1048.     ByVal y2 As Double, _ 
  1049.     ByVal z2 As Double _ 
  1050. ) As Long
  1051.  
  1052. '//Section
  1053. '//DRAWING - Point Creation Functions
  1054.  
  1055. '//These graphic creation functions add the graphic to the drawing.  
  1056. '//Do not use the graphic handle returned from these functions with
  1057. '//TCWGraphicAppend to append to the drawing or another graphic.
  1058.  
  1059. '//Description
  1060. '//This function will create a point that is a "dot".
  1061. '//
  1062. '//Input Parameters
  1063. '//Double x0            X coordinate for the point 
  1064. '//Double y0            Y coordinate for the point 
  1065. '//Double z0            Z coordinate for the point 
  1066. '//
  1067. '//Return Value
  1068. '//Returns the handle to the point graphic as a Long.
  1069. '//
  1070. '//See Also
  1071. '//TCWStar, TCWSquare, TCWCross, TCWCircle
  1072. '//
  1073. '//Coding Example
  1074. '//    Dim g As Long
  1075. '//    g = TCWDot(2.0, 3.0, 0.0)
  1076. '//    if (g = NULL)
  1077. '//        'check error
  1078. '//        ...
  1079. '//
  1080. '//Declaration
  1081. Declare Function TCWDot lib "TCAPI11" ( _ 
  1082.     ByVal x0 As Double, _ 
  1083.     ByVal y0 As Double, _ 
  1084.     ByVal z0 As Double _ 
  1085. ) As Long
  1086.  
  1087. '//Description
  1088. '//This function will create a point that is a "star".
  1089. '//
  1090. '//Input Parameters
  1091. '//Double x0            X coordinate for the point 
  1092. '//Double y0            Y coordinate for the point 
  1093. '//Double z0            Z coordinate for the point 
  1094. '//
  1095. '//Return Value
  1096. '//Returns the handle to the point graphic as a Long.
  1097. '//
  1098. '//See Also
  1099. '//TCWDot, TCWSquare, TCWCross, TCWCircle
  1100. '//
  1101. '//Coding Example
  1102. '//    Dim g As Long
  1103. '//    g = TCWStar(2.0, 3.0, 0.0)
  1104. '//    if (g = NULL)
  1105. '//        'check error
  1106. '//        ...
  1107. '//
  1108. '//Declaration
  1109. Declare Function TCWStar lib "TCAPI11" ( _ 
  1110.     ByVal x0 As Double, _ 
  1111.     ByVal y0 As Double, _ 
  1112.     ByVal z0 As Double _ 
  1113. ) As Long
  1114.  
  1115. '//Description
  1116. '// This function will create a point that is a "square".
  1117. '//
  1118. '//Input Parameters
  1119. '//Double x0            X coordinate for the point 
  1120. '//Double y0            Y coordinate for the point 
  1121. '//Double z0            Z coordinate for the point 
  1122. '//
  1123. '//Return Value
  1124. '//Returns the handle to the point graphic as a Long.
  1125. '//
  1126. '//See Also
  1127. '//TCWDot, TCWStar, TCWCross, TCWCircle
  1128. '//
  1129. '//Coding Example
  1130. '//    Dim g As Long
  1131. '//    g = TCWSquare(2.0, 3.0, 0.0)
  1132. '//    if (g = NULL)
  1133. '//        'check error
  1134. '//        ...
  1135. '//
  1136. '//Declaration
  1137. Declare Function TCWSquare lib "TCAPI11" ( _ 
  1138.     ByVal x0 As Double, _ 
  1139.     ByVal y0 As Double, _ 
  1140.     ByVal z0 As Double _ 
  1141. ) As Long
  1142.  
  1143. '//Description
  1144. '// This function will create a point that is a "cross".
  1145. '//
  1146. '//Input Parameters
  1147. '//Double x0            X coordinate for the point 
  1148. '//Double y0            Y coordinate for the point 
  1149. '//Double z0            Z coordinate for the point 
  1150. '//
  1151. '//Return Value
  1152. '//Returns the handle to the point graphic as a Long.
  1153. '//
  1154. '//See Also
  1155. '//TCWDot, TCWStar, TCWSquare, TCWCircle
  1156. '//
  1157. '//Coding Example
  1158. '//    Dim g As Long
  1159. '//    g = TCWCross(2.0, 3.0, 0.0)
  1160. '//    if (g = NULL)
  1161. '//        'check error
  1162. '//        ...
  1163. '//
  1164. '//Declaration
  1165. Declare Function TCWCross lib "TCAPI11" ( _ 
  1166.     ByVal x0 As Double, _ 
  1167.     ByVal y0 As Double, _ 
  1168.     ByVal z0 As Double _ 
  1169. ) As Long
  1170.  
  1171. '//Description
  1172. '// This function will create a point that is a "circle".
  1173. '//
  1174. '//Input Parameters
  1175. '//Double x0            X coordinate for the point 
  1176. '//Double y0            Y coordinate for the point 
  1177. '//Double z0            Z coordinate for the point 
  1178. '//
  1179. '//Return Value
  1180. '//Returns the handle to the point graphic as a Long.
  1181. '//
  1182. '//See Also
  1183. '// TCWDot, TCWStar, TCWSquare, TCWCross
  1184. '//
  1185. '//Coding Example
  1186. '//    Dim g As Long
  1187. '//    g = TCWCircle(2.0, 3.0, 0.0)
  1188. '//    if (g = NULL)
  1189. '//        'check error
  1190. '//        ...
  1191. '//
  1192. '//Declaration
  1193. Declare Function TCWCircle lib "TCAPI11" ( _ 
  1194.     ByVal x0 As Double, _ 
  1195.     ByVal y0 As Double, _ 
  1196.     ByVal z0 As Double _ 
  1197. ) As Long
  1198.  
  1199. '//Section
  1200. '//DRAWING - Line Creation Functions
  1201.  
  1202. '//These graphic creation functions add the graphic to the drawing.  
  1203. '//Do not use the graphic handle returned from these functions with
  1204. '//TCWGraphicAppend to append to the drawing or another graphic.
  1205.  
  1206. '//Description
  1207. '//This function will draw a single line segment from two specified end points.
  1208. '//
  1209. '//Input Parameters
  1210. '//Double x0            X coordinate for the first point 
  1211. '//Double y0            Y coordinate for the first point 
  1212. '//Double z0            Z coordinate for the first point 
  1213. '//Double x1            X coordinate for the second point
  1214. '//Double y1            Y coordinate for the second point
  1215. '//Double z1            Z coordinate for the second point
  1216. '//
  1217. '//Return Value
  1218. '//Returns the handle to the line graphic as a Long.
  1219. '//
  1220. '//See Also
  1221. '//
  1222. '//Coding Example
  1223. '//
  1224. '//Declaration
  1225. Declare Function TCWLineSingle lib "TCAPI11" ( _ 
  1226.     ByVal x0 As Double, _ 
  1227.     ByVal y0 As Double, _ 
  1228.     ByVal z0 As Double, _ 
  1229.     ByVal x1 As Double, _ 
  1230.     ByVal y1 As Double, _ 
  1231.     ByVal z1 As Double _ 
  1232. ) As Long
  1233.  
  1234. '//Description
  1235. '//This function will draw a regular polygon with the specified number
  1236. '//of sides.
  1237. '//
  1238. '//Input Parameters
  1239. '//Double x0            X coordinate for the center point
  1240. '//Double y0            Y coordinate for the center point
  1241. '//Double z0            Z coordinate for the center point
  1242. '//Double x1            X coordinate for the corner point
  1243. '//Double y1            Y coordinate for the corner point
  1244. '//Double z1            Z coordinate for the corner point
  1245. '//Long nsides        number of sides 
  1246. '//
  1247. '//Return Value
  1248. '//Returns the handle of the polygon graphic as a Long.  The polygon is 
  1249. '//constructed such that it would fit exactly inside a circle with  
  1250. '//the same center and radius.  
  1251. '//
  1252. '//See Also
  1253. '//
  1254. '//Coding Example
  1255. '//
  1256. '//Declaration
  1257. Declare Function TCWLinePolygon lib "TCAPI11" ( _ 
  1258.     ByVal x0 As Double, _ 
  1259.     ByVal y0 As Double, _ 
  1260.     ByVal z0 As Double, _ 
  1261.     ByVal x1 As Double, _ 
  1262.     ByVal y1 As Double, _ 
  1263.     ByVal z1 As Double, _ 
  1264.     ByVal nsides As Long _ 
  1265. ) As Long
  1266.  
  1267. '//Description
  1268. '//This function will draw an orthogonal rectangle.
  1269. '//
  1270. '//Input Parameters
  1271. '//Double x0            X coordinate of the upper left corner 
  1272. '//Double y0            Y coordinate of the upper left corner 
  1273. '//Double z0            Z coordinate of the upper left corner 
  1274. '//Double x1            X coordinate of the lower right corner
  1275. '//Double y1            Y coordinate of the lower right corner
  1276. '//Double z1            Z coordinate of the lower right corner
  1277. '//
  1278. '//Return Value
  1279. '//Returns the handle of a Graphic as a Long with contains 5 vertices.
  1280. '//
  1281. '//See Also
  1282. '//
  1283. '//Coding Example
  1284. '//
  1285. '//Declaration
  1286. Declare Function TCWLineRectangle lib "TCAPI11" ( _ 
  1287.     ByVal x0 As Double, _ 
  1288.     ByVal y0 As Double, _ 
  1289.     ByVal z0 As Double, _ 
  1290.     ByVal x1 As Double, _ 
  1291.     ByVal y1 As Double, _ 
  1292.     ByVal z1 As Double _ 
  1293. ) As Long
  1294.  
  1295. '//Description
  1296. '//This function will draw a rectangle oriented at the specified angle.
  1297. '//
  1298. '//Input Parameters
  1299. '//Double x0            X coordinate of the upper left corner 
  1300. '//Double y0            Y coordinate of the upper left corner 
  1301. '//Double z0            Z coordinate of the upper left corner 
  1302. '//Double x1            X coordinate of the lower right corner
  1303. '//Double y1            Y coordinate of the lower right corner
  1304. '//Double z1            Z coordinate of the lower right corner
  1305. '//Double height        angle of rotation in radians 
  1306. '//
  1307. '//Return Value
  1308. '//Returns a handle to a graphic with 5 vertices in the shape of a rectangle.  The
  1309. '//return value is a long. The fifth vertex is equal to the first.  The two points 
  1310. '//are the ends of the  base edge.  The height of the rectangle is drawn in the direction 
  1311. '//that would be a "right turn" when traveling from the first point to the second. 
  1312. '//
  1313. '//See Also
  1314. '//
  1315. '//Coding Example
  1316. '//
  1317. '//Declaration
  1318. Declare Function TCWLineRotatedRectangle lib "TCAPI11" ( _ 
  1319.     ByVal x0 As Double, _ 
  1320.     ByVal y0 As Double, _ 
  1321.     ByVal z0 As Double, _ 
  1322.     ByVal x1 As Double, _ 
  1323.     ByVal y1 As Double, _ 
  1324.     ByVal z1 As Double, _ 
  1325.     ByVal height As Double _ 
  1326. ) As Long
  1327.  
  1328. '//Description
  1329. '//This function will draw a line perpendicular to an existing line.
  1330. '//
  1331. '//Input Parameters
  1332. '//Long g            handle of line to make new line perpendicular to 
  1333. '//Double x0            X coordinate of the point on the existing line
  1334. '//Double y0            Y coordinate of the point on the existing line
  1335. '//Double z0            Z coordinate of the point on the existing line
  1336. '//
  1337. '//Return Value
  1338. '//Returns the handle of the perpendicular line as a Long.
  1339. '//
  1340. '//See Also
  1341. '//
  1342. '//Coding Example
  1343. '//
  1344. '//Declaration
  1345. Declare Function TCWLinePerpendicular lib "TCAPI11" ( _ 
  1346.     ByVal g As Long, _ 
  1347.     ByVal x0 As Double, _ 
  1348.     ByVal y0 As Double, _ 
  1349.     ByVal z0 As Double _ 
  1350. ) As Long
  1351.  
  1352. '//Description
  1353. '//This function will draw a line parallel to an existing line, at a
  1354. '//specified distance from the line.
  1355. '//
  1356. '//Input Parameters
  1357. '//Long g            handle of line to make new line parallel to
  1358. '//Double x0            X coordinate of the new line
  1359. '//Double y0            Y coordinate of the new line
  1360. '//Double z0            Z coordinate of the new line
  1361. '//
  1362. '//Return Value
  1363. '//Returns the handle to the new parallel line as a Long.
  1364. '//
  1365. '//See Also
  1366. '//
  1367. '//Coding Example
  1368. '//
  1369. '//Declaration
  1370. Declare Function TCWLineParallel lib "TCAPI11" ( _ 
  1371.     ByVal g As Long, _ 
  1372.     ByVal x0 As Double, _ 
  1373.     ByVal y0 As Double, _ 
  1374.     ByVal z0 As Double _ 
  1375. ) As Long
  1376.  
  1377. '//Section
  1378. '//DRAWING - Multi-line Creation Functions
  1379.  
  1380. '//These graphic creation functions add the graphic to the drawing.  
  1381. '//Do not use the graphic handle returned from these functions with
  1382. '//TCWGraphicAppend to append to the drawing or another graphic.
  1383.  
  1384. '//Description
  1385. '//This function will start the creation of a series of connected segments.
  1386. '//
  1387. '//Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next segment.  
  1388. '//Use TCWGraphicClose to close the multi-line into a polygon.  
  1389. '//
  1390. '//Input Parameters
  1391. '//Double x0            X coordinate of first end point 
  1392. '//Double y0            Y coordinate of first end point 
  1393. '//Double z0            Z coordinate of first end point 
  1394. '//
  1395. '//Return Value
  1396. '//Returns the handle to the graphic as a Long.
  1397. '//
  1398. '//See Also
  1399. '//TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1400. '//
  1401. '//Coding Example
  1402. '//
  1403. '//Declaration
  1404. Declare Function TCWLineMultiline lib "TCAPI11" ( _ 
  1405.     ByVal x0 As Double, _ 
  1406.     ByVal y0 As Double, _ 
  1407.     ByVal z0 As Double _ 
  1408. ) As Long
  1409.  
  1410. '//Description
  1411. '//This function will start the creation of an irregular polygon.  
  1412. '//
  1413. '//Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next point of the polygon.  
  1414. '//Use TCWGraphicClose to close the multi-line into the polygon.
  1415. '//
  1416. '//Input Parameters
  1417. '//Double x0            X coordinate of first end point
  1418. '//Double y0            Y coordinate of first end point
  1419. '//Double z0            Z coordinate of first end point
  1420. '//
  1421. '//Return Value
  1422. '//Returns the handle to the first segment as a Long.
  1423. '//
  1424. '//See Also
  1425. '//TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1426. '//
  1427. '//Coding Example
  1428. '//
  1429. '//Declaration
  1430. Declare Function TCWLineIrregularPolygon lib "TCAPI11" ( _ 
  1431.     ByVal x0 As Double, _ 
  1432.     ByVal y0 As Double, _ 
  1433.     ByVal z0 As Double _ 
  1434. ) As Long
  1435.  
  1436. '//Description
  1437. '//This function will start the creation of a series of connected double lines.
  1438. '//
  1439. '//Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next point of the segment.  
  1440. '//Use TCWGraphicClose to close the multi-double line into a polygon.  
  1441. '//
  1442. '//Input Parameters
  1443. '//Double x0            X coordinate of first end point
  1444. '//Double y0            Y coordinate of first end point
  1445. '//Double z0            Z coordinate of first end point
  1446. '//
  1447. '//Return Value
  1448. '//Returns the handle to the graphic as a Long.
  1449. '//
  1450. '//See Also
  1451. '//TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1452. '//
  1453. '//Coding Example
  1454. '//
  1455. '//Declaration
  1456. Declare Function TCWDoubleLineMultiline lib "TCAPI11" ( _ 
  1457.     ByVal x0 As Double, _ 
  1458.     ByVal y0 As Double, _ 
  1459.     ByVal z0 As Double _ 
  1460. ) As Long
  1461.  
  1462. '//Description
  1463. '//This function will start the creation of a double line polygon with an 
  1464. '//arbitrary number of sides.    
  1465. '//
  1466. '//Use TCWGraphicXYZAdd or TCWGraphicVertexAdd to define the next segment. 
  1467. '//Use TCWGraphicClose to close the multi-line into a polygon.  
  1468. '//
  1469. '//Input Parameters
  1470. '//Double x0            X coordinate of first end point
  1471. '//Double y0            Y coordinate of first end point
  1472. '//Double z0            Z coordinate of first end point
  1473. '//
  1474. '//Return Value
  1475. '//Returns the handle to the graphic as a long.
  1476. '//
  1477. '//See Also
  1478. '//TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1479. '//
  1480. '//Coding Example
  1481. '//
  1482. '//Declaration
  1483. Declare Function TCWDoubleLineIrregularPolygon lib "TCAPI11" ( _ 
  1484.     ByVal x0 As Double, _ 
  1485.     ByVal y0 As Double, _ 
  1486.     ByVal z0 As Double _ 
  1487. ) As Long
  1488.  
  1489. '//Description
  1490. '//This function will start the creation of a bezier curve, connecting
  1491. '//two end points that will gravitate toward control points along the path.
  1492. '//
  1493. '//Use TCWGraphicClose to close the bezier curve, matching the last end point
  1494. '//with the first end point. 
  1495. '//
  1496. '//Input Parameters
  1497. '//Double x0            X coordinate of the first end point 
  1498. '//Double y0            Y coordinate of the first end point 
  1499. '//Double z0            Z coordinate of the first end point 
  1500. '//
  1501. '//Return Value
  1502. '//Returns the handle to the graphic as a Long.
  1503. '//
  1504. '//See Also
  1505. '//TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1506. '//
  1507. '//Coding Example
  1508. '//
  1509. '//Declaration
  1510. Declare Function TCWCurveBezier lib "TCAPI11" ( _ 
  1511.     ByVal x0 As Double, _ 
  1512.     ByVal y0 As Double, _ 
  1513.     ByVal z0 As Double _ 
  1514. ) As Long
  1515.  
  1516. '//Description
  1517. '//This function will start the creation of a spline curve, connecting
  1518. '//a series of points into a continuous curve.   
  1519. '//
  1520. '//Use TCWGraphicClose to close the spline curve, matching the last end point 
  1521. '//with the first end point. 
  1522. '//
  1523. '//Input Parameters
  1524. '//Double x0            X coordinate of the first end point 
  1525. '//Double y0            Y coordinate of the first end point 
  1526. '//Double z0            Z coordinate of the first end point 
  1527. '//
  1528. '//Return Value
  1529. '//Returns the handle to the graphic as a Long.
  1530. '//
  1531. '//See Also
  1532. '//TCWGraphicClose, TCWGraphicXYZAdd, TCWGraphicVertexAdd
  1533. '//
  1534. '//Coding Example
  1535. '//
  1536. '//Declaration
  1537. Declare Function TCWCurveSpline lib "TCAPI11" ( _ 
  1538.     ByVal x0 As Double, _ 
  1539.     ByVal y0 As Double, _ 
  1540.     ByVal z0 As Double _ 
  1541. ) As Long
  1542.  
  1543. '//Section
  1544. '//DRAWING - Double Line Creation Functions
  1545.  
  1546. '//These graphic creation functions add the graphic to the drawing.  
  1547. '//Do not use the graphic handle returned from these functions with
  1548. '//TCWGraphicAppend to append to the drawing or another graphic.
  1549.  
  1550. '//Description
  1551. '//This function will draw a double line segment from two specified end points.
  1552. '//
  1553. '//Input Parameters
  1554. '//Double x0            X coordinate for the first point 
  1555. '//Double y0            Y coordinate for the first point 
  1556. '//Double z0            Z coordinate for the first point 
  1557. '//Double x1            X coordinate for the second point
  1558. '//Double y1            Y coordinate for the second point
  1559. '//Double z1            Z coordinate for the second point
  1560. '//
  1561. '//Return Value
  1562. '//Returns the handle to the double line as a Long.
  1563. '//
  1564. '//See Also
  1565. '//
  1566. '//Coding Example
  1567. '//
  1568. '//Declaration
  1569. Declare Function TCWDoubleLineSingle lib "TCAPI11" ( _ 
  1570.     ByVal x0 As Double, _ 
  1571.     ByVal y0 As Double, _ 
  1572.     ByVal z0 As Double, _ 
  1573.     ByVal x1 As Double, _ 
  1574.     ByVal y1 As Double, _ 
  1575.     ByVal z1 As Double _ 
  1576. ) As Long
  1577.  
  1578. '//Description
  1579. '//This function will draw a regular double line  polygon with the specified 
  1580. '//number of sides.
  1581. '//
  1582. '//Input Parameters
  1583. '//Double x0            X coordinate for the center point 
  1584. '//Double y0            Y coordinate for the center point 
  1585. '//Double z0            Z coordinate for the center point 
  1586. '//Double x1            X coordinate for the corner point 
  1587. '//Double y1            Y coordinate for the corner point 
  1588. '//Double z1            Z coordinate for the corner point 
  1589. '//Long nsides        number of sides
  1590. '//
  1591. '//Return Value
  1592. '//Returns the handle of the polygon graphic as a Long.  The polygon is 
  1593. '//constructed such that it would fit exactly inside a circle with the same 
  1594. '//center and radius.  
  1595. '//
  1596. '//See Also
  1597. '//
  1598. '//Coding Example
  1599. '//
  1600. '//Declaration
  1601. Declare Function TCWDoubleLinePolygon lib "TCAPI11" ( _ 
  1602.     ByVal x0 As Double, _ 
  1603.     ByVal y0 As Double, _ 
  1604.     ByVal z0 As Double, _ 
  1605.     ByVal x1 As Double, _ 
  1606.     ByVal y1 As Double, _ 
  1607.     ByVal z1 As Double, _ 
  1608.     ByVal nsides As Long _ 
  1609. ) As Long
  1610.  
  1611. '//Description
  1612. '//This function will draw an orthogonal double line rectangle.
  1613. '//
  1614. '//Input Parameters
  1615. '//Double x0            X coordinate of the upper left corner 
  1616. '//Double y0            Y coordinate of the upper left corner 
  1617. '//Double z0            Z coordinate of the upper left corner 
  1618. '//Double x1            X coordinate of the lower right corner
  1619. '//Double y1            Y coordinate of the lower right corner
  1620. '//Double z1            Z coordinate of the lower right corner
  1621. '//
  1622. '//Return Value
  1623. '//Returns the handle of a graphic with 5 vertices.  The return value is a Long.
  1624. '//
  1625. '//See Also
  1626. '//
  1627. '//Coding Example
  1628. '//
  1629. '//Declaration
  1630. Declare Function TCWDoubleLineRectangle lib "TCAPI11" ( _ 
  1631.     ByVal x0 As Double, _ 
  1632.     ByVal y0 As Double, _ 
  1633.     ByVal z0 As Double, _ 
  1634.     ByVal x1 As Double, _ 
  1635.     ByVal y1 As Double, _ 
  1636.     ByVal z1 As Double _ 
  1637. ) As Long
  1638.  
  1639. '//Description
  1640. '//This function will draw a double line rectangle oriented at the specified angle.
  1641. '//
  1642. '//Input Parameters
  1643. '//Double x0            X coordinate of the upper left corner 
  1644. '//Double y0            Y coordinate of the upper left corner 
  1645. '//Double z0            Z coordinate of the upper left corner 
  1646. '//Double x1            X coordinate of the lower right corner
  1647. '//Double y1            Y coordinate of the lower right corner
  1648. '//Double z1            Z coordinate of the lower right corner
  1649. '//Double height        angle of rotation in radians 
  1650. '//
  1651. '//Return Value
  1652. '//Returns a handle to a graphic with 5 vertices in the shape of a rectangle.
  1653. '//The fifth vertex is equal to the first.  The two points are the ends of the 
  1654. '//base edge.  The height of the rectangle is drawn in the direction that would 
  1655. '//be a "right turn" when traveling from the first point to the second. 
  1656. '//
  1657. '//See Also
  1658. '//
  1659. '//Coding Example
  1660. '//
  1661. '//Declaration
  1662. Declare Function TCWDoubleLineRotatedRectangle lib "TCAPI11" ( _ 
  1663.     ByVal x0 As Double, _ 
  1664.     ByVal y0 As Double, _ 
  1665.     ByVal z0 As Double, _ 
  1666.     ByVal x1 As Double, _ 
  1667.     ByVal y1 As Double, _ 
  1668.     ByVal z1 As Double, _ 
  1669.     ByVal height As Double _ 
  1670. ) As Long
  1671.  
  1672. '//Description
  1673. '//This function will draw a double line perpendicular to an existing line.
  1674. '//
  1675. '//Input Parameters
  1676. '//Long g            handle of line to make new line perpendicular to
  1677. '//Double x0            X coordinate of the point on the existing line
  1678. '//Double y0            Y coordinate of the point on the existing line 
  1679. '//Double z0            Z coordinate of the point on the existing line
  1680. '//Double x1            X coordinate of the second point on the new line
  1681. '//Double y1            Y coordinate of the second point on the new line
  1682. '//Double z1            Z coordinate of the second point on the new line
  1683. '//
  1684. '//Return Value
  1685. '//Returns the handle of the perpendicular double line as a Long.
  1686. '//
  1687. '//See Also
  1688. '//
  1689. '//Coding Example
  1690. '//
  1691. '//Declaration
  1692. Declare Function TCWDoubleLinePerpendicular lib "TCAPI11" ( _ 
  1693.     ByVal g As Long, _ 
  1694.     ByVal x0 As Double, _ 
  1695.     ByVal y0 As Double, _ 
  1696.     ByVal z0 As Double, _ 
  1697.     ByVal x1 As Double, _ 
  1698.     ByVal y1 As Double, _ 
  1699.     ByVal z1 As Double _ 
  1700. ) As Long
  1701.  
  1702. '//Description
  1703. '//This function will draw a double line parallel to an existing line, at a
  1704. '//specified distance from the line.
  1705. '//
  1706. '//Input Parameters
  1707. '//Long g            handle of line to make new line parallel to
  1708. '//Double x0            X coordinate of the new line
  1709. '//Double y0            Y coordinate of the new line
  1710. '//Double z0            Z coordinate of the new line
  1711. '//
  1712. '//Return Value
  1713. '//Returns the handle to the new parallel line as a Long.
  1714. '//
  1715. '//See Also
  1716. '//
  1717. '//Coding Example
  1718. '//
  1719. '//Declaration
  1720. Declare Function TCWDoubleLineParallel lib "TCAPI11" ( _ 
  1721.     ByVal g As Long, _ 
  1722.     ByVal x0 As Double, _ 
  1723.     ByVal y0 As Double, _ 
  1724.     ByVal z0 As Double _ 
  1725. ) As Long
  1726.  
  1727. '//Section
  1728. '// DRAWING - Circle and Ellipse Creation Functions
  1729.  
  1730. '//These graphic creation functions add the graphic to the drawing.  
  1731. '//Do not use the graphic handle returned from these functions with
  1732. '//TCWGraphicAppend to append to the drawing or another graphic.
  1733.  
  1734. '//Description
  1735. '//This function will draw a circle from the specified center point and radius.
  1736. '//
  1737. '//Input Parameters
  1738. '//Double x0            X coordinate of the center point
  1739. '//Double y0            Y coordinate of the center point
  1740. '//Double z0            Z coordinate of the center point
  1741. '//Double x1            X coordinate of the radius point
  1742. '//Double y1            Y coordinate of the radius point
  1743. '//Double z1            Z coordinate of the radius point
  1744. '//
  1745. '//Return Value
  1746. '//Returns the handle to the circle as a Long.
  1747. '//
  1748. '//See Also
  1749. '//
  1750. '//Coding Example
  1751. '//
  1752. '//Declaration
  1753. Declare Function TCWCircleCenterAndPoint lib "TCAPI11" ( _ 
  1754.     ByVal x0 As Double, _ 
  1755.     ByVal y0 As Double, _ 
  1756.     ByVal z0 As Double, _ 
  1757.     ByVal x1 As Double, _ 
  1758.     ByVal y1 As Double, _ 
  1759.     ByVal z1 As Double _ 
  1760. ) As Long
  1761.  
  1762. '//Description
  1763. '//This function will draw a circle using two opposite points on its perimeter.
  1764. '//
  1765. '//Input Parameters
  1766. '//Double x0            X coordinate of the first point 
  1767. '//Double y0            Y coordinate of the first point 
  1768. '//Double z0            Z coordinate of the first point 
  1769. '//Double x1            X coordinate of the second point
  1770. '//Double y1            Y coordinate of the second point
  1771. '//Double z1            Z coordinate of the second point
  1772. '//
  1773. '//Return Value
  1774. '//Returns the handle to the circle as a Long.
  1775. '//
  1776. '//See Also
  1777. '//
  1778. '//Coding Example
  1779. '//
  1780. '//Declaration
  1781. Declare Function TCWCircleDoublePoint lib "TCAPI11" ( _ 
  1782.     ByVal x0 As Double, _ 
  1783.     ByVal y0 As Double, _ 
  1784.     ByVal z0 As Double, _ 
  1785.     ByVal x1 As Double, _ 
  1786.     ByVal y1 As Double, _ 
  1787.     ByVal z1 As Double _ 
  1788. ) As Long
  1789.  
  1790. '//Description
  1791. '//This function will draw a circle by defining three point on the circle's
  1792. '//perimeter.
  1793. '//
  1794. '//Input Parameters
  1795. '//Double x0            X coordinate of the first point 
  1796. '//Double y0            Y coordinate of the first point 
  1797. '//Double z0            Z coordinate of the first point 
  1798. '//Double x1            X coordinate of the second point
  1799. '//Double y1            Y coordinate of the second point
  1800. '//Double z1            Z coordinate of the second point
  1801. '//Double x2            X coordinate of the third point 
  1802. '//Double y2            Y coordinate of the third point 
  1803. '//Double z2            Z coordinate of the third point 
  1804. '//
  1805. '//Return Value
  1806. '//Returns the handle to the circle as a Long.
  1807. '//
  1808. '//See Also
  1809. '//
  1810. '//Coding Example
  1811. '//
  1812. '//Declaration
  1813. Declare Function TCWCircleTriplePoint lib "TCAPI11" ( _ 
  1814.     ByVal x0 As Double, _ 
  1815.     ByVal y0 As Double, _ 
  1816.     ByVal z0 As Double, _ 
  1817.     ByVal x1 As Double, _ 
  1818.     ByVal y1 As Double, _ 
  1819.     ByVal z1 As Double, _ 
  1820.     ByVal x2 As Double, _ 
  1821.     ByVal y2 As Double, _ 
  1822.     ByVal z2 As Double _ 
  1823. ) As Long
  1824.  
  1825. '//Description
  1826. '//This function will draw an ellipse by defining its bounding rectangle.
  1827. '//
  1828. '//Input Parameters
  1829. '//Double x0            X coordinate of bounding rectangle's upper left corner 
  1830. '//Double y0            Y coordinate of bounding rectangle's upper left corner 
  1831. '//Double z0            Z coordinate of bounding rectangle's upper left corner 
  1832. '//Double x1            X coordinate of bounding rectangle's lower right corner
  1833. '//Double y1            Y coordinate of bounding rectangle's lower right corner
  1834. '//Double z1            Z coordinate of bounding rectangle's lower right corner
  1835. '//
  1836. '//Return Value
  1837. '//Returns the handle to the ellipse as a Long.
  1838. '//
  1839. '//See Also
  1840. '//
  1841. '//Coding Example
  1842. '//
  1843. '//Declaration
  1844. Declare Function TCWEllipse lib "TCAPI11" ( _ 
  1845.     ByVal x0 As Double, _ 
  1846.     ByVal y0 As Double, _ 
  1847.     ByVal z0 As Double, _ 
  1848.     ByVal x1 As Double, _ 
  1849.     ByVal y1 As Double, _ 
  1850.     ByVal z1 As Double _ 
  1851. ) As Long
  1852.  
  1853. '//Description
  1854. '//This function will draw an ellipse rotated by specifying the ellipse's
  1855. '//center point, and major and minor axis radius points.
  1856. '//
  1857. '//Input Parameters
  1858. '//Double x0            X coordinate of ellipse's center point 
  1859. '//Double y0            Y coordinate of ellipse's center point 
  1860. '//Double z0            Z coordinate of ellipse's center point 
  1861. '//Double x1            X coordinate of major axis radius point
  1862. '//Double y1            Y coordinate of major axis radius point
  1863. '//Double z1            Z coordinate of major axis radius point
  1864. '//Double x2            X coordinate of minor axis radius point
  1865. '//Double y2            Y coordinate of minor axis radius point
  1866. '//Double z2            Z coordinate of minor axis radius point
  1867. '//
  1868. '//Return Value
  1869. '//Returns the handle of the rotated ellipse as a Long.
  1870. '//
  1871. '//See Also
  1872. '//
  1873. '//Coding Example
  1874. '//
  1875. '//Declaration
  1876. Declare Function TCWEllipseRotatedEllipse lib "TCAPI11" ( _ 
  1877.     ByVal x0 As Double, _ 
  1878.     ByVal y0 As Double, _ 
  1879.     ByVal z0 As Double, _ 
  1880.     ByVal x1 As Double, _ 
  1881.     ByVal y1 As Double, _ 
  1882.     ByVal z1 As Double, _ 
  1883.     ByVal x2 As Double, _ 
  1884.     ByVal y2 As Double, _ 
  1885.     ByVal z2 As Double _ 
  1886. ) As Long
  1887.  
  1888. '//Description
  1889. '//This function will draw an ellipse, specified by the ratio of the
  1890. '//major axis length to the minor axis length.
  1891. '//
  1892. '//Input Parameters
  1893. '//Double x0            X coordinate of ellipse's center point
  1894. '//Double y0            Y coordinate of ellipse's center point
  1895. '//Double z0            Z coordinate of ellipse's center point
  1896. '//Double x1            X coordinate of radius in Y direction 
  1897. '//Double y1            Y coordinate of radius in Y direction 
  1898. '//Double z1            Z coordinate of radius in Y direction 
  1899. '//Double xyratio    ratio of Rx/Ry 
  1900. '//
  1901. '//Return Value
  1902. '//Returns the handle to the ellipse as a Long.
  1903. '//
  1904. '//See Also
  1905. '//
  1906. '//Coding Example
  1907. '//
  1908. '//Declaration
  1909. Declare Function TCWEllipseFixedRatio lib "TCAPI11" ( _ 
  1910.     ByVal x0 As Double, _ 
  1911.     ByVal y0 As Double, _ 
  1912.     ByVal z0 As Double, _ 
  1913.     ByVal x1 As Double, _ 
  1914.     ByVal y1 As Double, _ 
  1915.     ByVal z1 As Double, _ 
  1916.     ByVal xyratio As Double _ 
  1917. ) As Long
  1918.  
  1919. '//Section
  1920. '//DRAWING - Arc Creation Functions
  1921.  
  1922. '//These graphic creation functions add the graphic to the drawing.  
  1923. '//Do not use the graphic handle returned from these functions with
  1924. '//TCWGraphicAppend to append to the drawing or another graphic.
  1925.  
  1926. '//Description
  1927. '//This function will draw a circular arc specified by it's center point,
  1928. '//point on it's circumference and a start and end angle. 
  1929. '//
  1930. '//Input Parameters
  1931. '//Double x0            X coordinate of arc's center point
  1932. '//Double y0            Y coordinate of arc's center point
  1933. '//Double z0            Z coordinate of arc's center point
  1934. '//Double x1            X coordinate of the radius point
  1935. '//Double y1            Y coordinate of the radius point
  1936. '//Double z1            Z coordinate of the radius point
  1937. '//Double startangle    starting angle in radians
  1938. '//Double endangle    ending angle in radians 
  1939. '//
  1940. '//Return Value
  1941. '//Returns the handle of the arc as a Long.
  1942. '//
  1943. '//See Also
  1944. '//
  1945. '//Coding Example
  1946. '//
  1947. '//Declaration
  1948. Declare Function TCWArcCenterAndPoint lib "TCAPI11" ( _ 
  1949.     ByVal x0 As Double, _ 
  1950.     ByVal y0 As Double, _ 
  1951.     ByVal z0 As Double, _ 
  1952.     ByVal x1 As Double, _ 
  1953.     ByVal y1 As Double, _ 
  1954.     ByVal z1 As Double, _ 
  1955.     ByVal startangle As Double, _ 
  1956.     ByVal endangle As Double _ 
  1957. ) As Long
  1958.  
  1959. '//Description
  1960. '//This function will draw a circular arc from specified end points
  1961. '//of its diameter.
  1962. '//
  1963. '//Input Parameters
  1964. '//Double x0            X coordinate of first end point 
  1965. '//Double y0            Y coordinate of first end point 
  1966. '//Double z0            Z coordinate of first end point 
  1967. '//Double x1            X coordinate of second end point
  1968. '//Double y1            Y coordinate of second end point 
  1969. '//Double z1            Z coordinate of second end point
  1970. '//Double startangle    starting angle in radians 
  1971. '//Double endangle    ending angle in radians
  1972. '//
  1973. '//Return Value
  1974. '//Returns the handle to the arc as a Long.
  1975. '//
  1976. '//See Also
  1977. '//
  1978. '//Coding Example
  1979. '//
  1980. '//Declaration
  1981. Declare Function TCWArcDoublePoint lib "TCAPI11" ( _ 
  1982.     ByVal x0 As Double, _ 
  1983.     ByVal y0 As Double, _ 
  1984.     ByVal z0 As Double, _ 
  1985.     ByVal x1 As Double, _ 
  1986.     ByVal y1 As Double, _ 
  1987.     ByVal z1 As Double, _ 
  1988.     ByVal startangle As Double, _ 
  1989.     ByVal endangle As Double _ 
  1990. ) As Long
  1991.  
  1992. '//Description
  1993. '//This function will draw a circular arc by defining (1) its starting
  1994. '//point, (2) a point on its perimeter and (3) its ending point.
  1995. '//
  1996. '//Input Parameters
  1997. '//Double x0            X coordinate of starting point 
  1998. '//Double y0            Y coordinate of starting point 
  1999. '//Double z0            Z coordinate of starting point 
  2000. '//Double x1            X coordinate of point on perimeter 
  2001. '//Double y1            Y coordinate of point on perimeter 
  2002. '//Double z1            Z coordinate of point on perimeter 
  2003. '//Double x2            X coordinate of ending point
  2004. '//Double y2            Y coordinate of ending point
  2005. '//Double z2            Z coordinate of ending point
  2006. '//
  2007. '//Return Value
  2008. '//Returns the handle to the arc as a Long.
  2009. '//
  2010. '//See Also
  2011. '//
  2012. '//Coding Example
  2013. '//
  2014. '//Declaration
  2015. Declare Function TCWArcTriplePoint lib "TCAPI11" ( _ 
  2016.     ByVal x0 As Double, _ 
  2017.     ByVal y0 As Double, _ 
  2018.     ByVal z0 As Double, _ 
  2019.     ByVal x1 As Double, _ 
  2020.     ByVal y1 As Double, _ 
  2021.     ByVal z1 As Double, _ 
  2022.     ByVal x2 As Double, _ 
  2023.     ByVal y2 As Double, _ 
  2024.     ByVal z2 As Double _ 
  2025. ) As Long
  2026.  
  2027. '//Description
  2028. '//This function will draw an elliptical arc specified by its bounding
  2029. '//rectangle, starting and ending angles.
  2030. '//
  2031. '//Input Parameters
  2032. '//Double x0            X coordinate of bounding rectangle's upper left corner 
  2033. '//Double y0            Y coordinate of bounding rectangle's upper left corner 
  2034. '//Double z0            Z coordinate of bounding rectangle's upper left corner 
  2035. '//Double x1            X coordinate of bounding rectangle's lower right corner
  2036. '//Double y1            Y coordinate of bounding rectangle's lower right corner
  2037. '//Double z1            Z coordinate of bounding rectangle's lower right corner
  2038. '//Double startangle    starting angle in radians 
  2039. '//Double endangle    ending angle in radians 
  2040. '//
  2041. '//Return Value
  2042. '//Returns a handle to the elliptical arc as a Long.
  2043. '//
  2044. '//See Also
  2045. '//
  2046. '//Coding Example
  2047. '//
  2048. '//Declaration
  2049. Declare Function TCWArcElliptical lib "TCAPI11" ( _ 
  2050.     ByVal x0 As Double, _ 
  2051.     ByVal y0 As Double, _ 
  2052.     ByVal z0 As Double, _ 
  2053.     ByVal x1 As Double, _ 
  2054.     ByVal y1 As Double, _ 
  2055.     ByVal z1 As Double, _ 
  2056.     ByVal startangle As Double, _ 
  2057.     ByVal endangle As Double _ 
  2058. ) As Long
  2059.  
  2060. '//Description
  2061. '//This function will draw an elliptical arc rotated by specifying the ellipse's
  2062. '//center point, and major and minor axis radius points, start and end angles.
  2063. '//
  2064. '//Input Parameters
  2065. '//Double x0            X coordinate of elliptical arc's center point
  2066. '//Double y0            Y coordinate of elliptical arc's center point
  2067. '//Double z0            Z coordinate of elliptical arc's center point
  2068. '//Double x1            X coordinate of major axis radius point
  2069. '//Double y1            Y coordinate of major axis radius point
  2070. '//Double z1            Z coordinate of major axis radius point
  2071. '//Double x2            X coordinate of minor axis radius point
  2072. '//Double y2            Y coordinate of minor axis radius point
  2073. '//Double z2            Z coordinate of minor axis radius point
  2074. '//Double startangle    starting angle in radians 
  2075. '//Double endangle    ending angle in radians
  2076. '//
  2077. '//Return Value
  2078. '//Returns the handle of the rotated elliptical arc as a Long.
  2079. '//
  2080. '//See Also
  2081. '//
  2082. '//Coding Example
  2083. '//
  2084. '//Declaration
  2085. Declare Function TCWArcRotatedElliptical lib "TCAPI11" ( _ 
  2086.     ByVal x0 As Double, _ 
  2087.     ByVal y0 As Double, _ 
  2088.     ByVal z0 As Double, _ 
  2089.     ByVal x1 As Double, _ 
  2090.     ByVal y1 As Double, _ 
  2091.     ByVal z1 As Double, _ 
  2092.     ByVal x2 As Double, _ 
  2093.     ByVal y2 As Double, _ 
  2094.     ByVal z2 As Double, _ 
  2095.     ByVal startangle As Double, _ 
  2096.     ByVal endangle As Double _ 
  2097. ) As Long
  2098.  
  2099. '//Description
  2100. '//This function will draw an elliptical arc, specified by the ratio of the
  2101. '//major axis length to the minor axis length.
  2102. '//
  2103. '//Input Parameters
  2104. '//Double x0            X coordinate of ellipse's center point
  2105. '//Double y0            Y coordinate of ellipse's center point
  2106. '//Double z0            Z coordinate of ellipse's center point
  2107. '//Double x1            X coordinate of radius in Y direction 
  2108. '//Double y1            Y coordinate of radius in Y direction 
  2109. '//Double z1            Z coordinate of radius in Y direction 
  2110. '//Double xyratio    ratio of Rx/Ry
  2111. '//Double startangle    starting angle in radians
  2112. '//Double endangle    ending angle in radians 
  2113. '//
  2114. '//Return Value
  2115. '//Returns the handle to the ellipse as a Long.
  2116. '//
  2117. '//See Also
  2118. '//
  2119. '//Coding Example
  2120. '//
  2121. '//Declaration
  2122. Declare Function TCWArcEllipticalFixedRatio lib "TCAPI11" ( _ 
  2123.     ByVal x0 As Double, _ 
  2124.     ByVal y0 As Double, _ 
  2125.     ByVal z0 As Double, _ 
  2126.     ByVal x1 As Double, _ 
  2127.     ByVal y1 As Double, _ 
  2128.     ByVal z1 As Double, _ 
  2129.     ByVal xyratio As Double, _ 
  2130.     ByVal startangle As Double, _ 
  2131.     ByVal endangle As Double _ 
  2132. ) As Long
  2133.  
  2134. '//Section
  2135. '//DRAWING - Text Creation Function
  2136.  
  2137. '//This graphic creation function adds the graphic to the drawing.  
  2138. '//Do not use the graphic handle returned from this function with
  2139. '//TCWGraphicAppend to append to the drawing or another graphic.
  2140.  
  2141. '//Description
  2142. '//This function will create text starting at the point specified.
  2143. '//
  2144. '//Input Parameters
  2145. '//Double x0            X coordinate of text's starting point
  2146. '//Double y0            Y coordinate of text's starting point
  2147. '//Double z0            Z coordinate of text's starting point
  2148. '//String textstr    text string
  2149. '//Double size        font size
  2150. '//Double angle        angle of text
  2151. '//
  2152. '//Return Value
  2153. '//Returns a handle to the text.
  2154. '//
  2155. '//See Also
  2156. '//
  2157. '//Coding Example
  2158. '//
  2159. '//Declaration
  2160. Declare Function TCWText lib "TCAPI11" ( _ 
  2161.     ByVal x0 As Double, _ 
  2162.     ByVal y0 As Double, _ 
  2163.     ByVal z0 As Double, _ 
  2164.     ByRef textstr As String, _ 
  2165.     ByVal size As Double, _ 
  2166.     ByVal angle As Double _ 
  2167. ) As Long
  2168.  
  2169. '//Section
  2170. '//DRAWING - Dimension Creation Functions
  2171.  
  2172. '//These graphic creation functions add the graphic to the drawing.  
  2173. '//Do not use the graphic handle returned from these functions with
  2174. '//TCWGraphicAppend to append to the drawing or another graphic.
  2175.  
  2176. '//Description
  2177. '//This function will create a linear dimension showing horizontal distance.
  2178. '//
  2179. '//Input Parameters
  2180. '//Double x0            X coordinate of first extension line 
  2181. '//Double y0            Y coordinate of first extension line 
  2182. '//Double z0            Z coordinate of first extension line 
  2183. '//Double x1            X coordinate of second extension line
  2184. '//Double y1            Y coordinate of second extension line
  2185. '//Double z1            Z coordinate of second extension line
  2186. '//Double x2            X coordinate of dimension 
  2187. '//Double y2            Y coordinate of dimension 
  2188. '//Double z2            Z coordinate of dimension 
  2189. '//
  2190. '//Return Value
  2191. '//Returns the handle to the dimension as a Long.
  2192. '//
  2193. '//See Also
  2194. '//
  2195. '//Coding Example
  2196. '//
  2197. '//Declaration
  2198. Declare Function TCWDimensionHorizontal lib "TCAPI11" ( _ 
  2199.     ByVal x0 As Double, _ 
  2200.     ByVal y0 As Double, _ 
  2201.     ByVal z0 As Double, _ 
  2202.     ByVal x1 As Double, _ 
  2203.     ByVal y1 As Double, _ 
  2204.     ByVal z1 As Double, _ 
  2205.     ByVal x2 As Double, _ 
  2206.     ByVal y2 As Double, _ 
  2207.     ByVal z2 As Double _ 
  2208. ) As Long
  2209.  
  2210. '//Description
  2211. '//This function will create a linear dimension showing horizontal distance.
  2212. '//
  2213. '//Input Parameters
  2214. '//Long g            entity to horizontally dimension 
  2215. '//Double x0            X coordinate for dimension line location
  2216. '//Double y0            Y coordinate for dimension line location
  2217. '//Double z0            Z coordinate for dimension line location
  2218. '//
  2219. '//Return Value
  2220. '//Returns the handle to the dimension as a Long.
  2221. '//
  2222. '//See Also
  2223. '//
  2224. '//Coding Example
  2225. '//
  2226. '//Declaration
  2227. Declare Function TCWDimensionHorizontalEntity lib "TCAPI11" ( _ 
  2228.     ByVal g As Long, _ 
  2229.     ByVal x0 As Double, _ 
  2230.     ByVal y0 As Double, _ 
  2231.     ByVal z0 As Double _ 
  2232. ) As Long
  2233.  
  2234. '//Description
  2235. '//This function will create a linear dimension showing vertical distance.
  2236. '//
  2237. '//Input Parameters
  2238. '//Double x0            X coordinate of first extension line 
  2239. '//Double y0            Y coordinate of first extension line 
  2240. '//Double z0            Z coordinate of first extension line 
  2241. '//Double x1            X coordinate of second extension line
  2242. '//Double y1            Y coordinate of second extension line
  2243. '//Double z1            Z coordinate of second extension line
  2244. '//Double x2            X coordinate of dimension 
  2245. '//Double y2            Y coordinate of dimension 
  2246. '//Double z2            Z coordinate of dimension 
  2247. '//
  2248. '//Return Value
  2249. '//Returns the handle to the dimension as a Long.
  2250. '//
  2251. '//See Also
  2252. '//
  2253. '//Coding Example
  2254. '//
  2255. '//Declaration
  2256. Declare Function TCWDimensionVertical lib "TCAPI11" ( _ 
  2257.     ByVal x0 As Double, _ 
  2258.     ByVal y0 As Double, _ 
  2259.     ByVal z0 As Double, _ 
  2260.     ByVal x1 As Double, _ 
  2261.     ByVal y1 As Double, _ 
  2262.     ByVal z1 As Double, _ 
  2263.     ByVal x2 As Double, _ 
  2264.     ByVal y2 As Double, _ 
  2265.     ByVal z2 As Double _ 
  2266. ) As Long
  2267.  
  2268. '//Description
  2269. '//This function will create a linear dimension showing vertical distance.
  2270. '//
  2271. '//Input Parameters
  2272. '//Long g            entity to vertically dimension 
  2273. '//Double x0            X coordinate for dimension line location 
  2274. '//Double y0            Y coordinate for dimension line location
  2275. '//Double z0            Z coordinate for dimension line location
  2276. '//
  2277. '//Return Value
  2278. '//Returns the handle to the dimension as a Long.
  2279. '//
  2280. '//See Also
  2281. '//
  2282. '//Coding Example
  2283. '//
  2284. '//Declaration
  2285. Declare Function TCWDimensionVerticalEntity lib "TCAPI11" ( _ 
  2286.     ByVal g As Long, _ 
  2287.     ByVal x0 As Double, _ 
  2288.     ByVal y0 As Double, _ 
  2289.     ByVal z0 As Double _ 
  2290. ) As Long
  2291.  
  2292. '//Description
  2293. '//This function will create a linear dimension showing absolute distance
  2294. '//between two points.
  2295. '//
  2296. '//Input Parameters
  2297. '//Double x0            X coordinate of first extension line 
  2298. '//Double y0            Y coordinate of first extension line 
  2299. '//Double z0            Z coordinate of first extension line 
  2300. '//Double x1            X coordinate of second extension line
  2301. '//Double y1            Y coordinate of second extension line
  2302. '//Double z1            Z coordinate of second extension line
  2303. '//Double x2            X coordinate of dimension 
  2304. '//Double y2            Y coordinate of dimension 
  2305. '//Double z2            Z coordinate of dimension 
  2306. '//
  2307. '//Return Value
  2308. '//Returns the handle to the dimension as a Long.
  2309. '//
  2310. '//See Also
  2311. '//
  2312. '//Coding Example
  2313. '//
  2314. '//Declaration
  2315. Declare Function TCWDimensionParallel lib "TCAPI11" ( _ 
  2316.     ByVal x0 As Double, _ 
  2317.     ByVal y0 As Double, _ 
  2318.     ByVal z0 As Double, _ 
  2319.     ByVal x1 As Double, _ 
  2320.     ByVal y1 As Double, _ 
  2321.     ByVal z1 As Double, _ 
  2322.     ByVal x2 As Double, _ 
  2323.     ByVal y2 As Double, _ 
  2324.     ByVal z2 As Double _ 
  2325. ) As Long
  2326.  
  2327. '//Description
  2328. '//This function will create a linear dimension showing parallel distance.
  2329. '//
  2330. '//Input Parameters
  2331. '//Long g            entity to dimension 
  2332. '//Double x0            X coordinate for dimension line location 
  2333. '//Double y0            Y coordinate for dimension line location
  2334. '//Double z0            Z coordinate for dimension line location
  2335. '//
  2336. '//Return Value
  2337. '//Returns the handle to the dimension as a Long.
  2338. '//
  2339. '//See Also
  2340. '//
  2341. '//Coding Example
  2342. '//
  2343. '//Declaration
  2344. Declare Function TCWDimensionParallelEntity lib "TCAPI11" ( _ 
  2345.     ByVal g As Long, _ 
  2346.     ByVal x0 As Double, _ 
  2347.     ByVal y0 As Double, _ 
  2348.     ByVal z0 As Double _ 
  2349. ) As Long
  2350.  
  2351. '//Section
  2352. '//DRAWING - Undo Record Functions
  2353.  
  2354. '//Use these functions to create your own kind of undo which includes one or
  2355. '//more operations. Then, with one undo you can get back to the beginning.
  2356. '//TCADAPI will create undo records for all align functions, graphic creation and 
  2357. '//deletion, selection deletion, selection scaling, rotating and moving, explode, and group. 
  2358.  
  2359. '//Description
  2360. '//This function will start an undo record.  NOTE: a start record MUST be matched 
  2361. '//with an end record.
  2362. '//
  2363. '//Input Parameters
  2364. '//Long d            handle of a drawing 
  2365. '//String title        string to associate with undo record   
  2366. '//
  2367. '//Return Value
  2368. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2369. '//error string.
  2370. '//
  2371. '//See Also
  2372. '//TCWUndoRecordAddGraphic, TCWUndoRecordEnd
  2373. '//
  2374. '//Coding Example
  2375. '//
  2376. '//Declaration
  2377. Declare Function TCWUndoRecordStart lib "TCAPI11" ( _ 
  2378.     ByVal d As Long, _ 
  2379.     ByRef title As String _ 
  2380. ) As Long
  2381.  
  2382. '//Description
  2383. '//This function will add graphics to the undo record.  Use this
  2384. '//function to accumulate graphics that you may want to undo.
  2385. '//
  2386. '//Input Parameters
  2387. '//Long d            handle of a drawing 
  2388. '//Long g            graphic to add to undo record 
  2389. '//
  2390. '//Return Value
  2391. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2392. '//error string.
  2393. '//
  2394. '//See Also
  2395. '//TCWUndoRecordStart, TCWUndoRecordEnd
  2396. '//
  2397. '//Coding Example
  2398. '//
  2399. '//Declaration
  2400. Declare Function TCWUndoRecordAddGraphic lib "TCAPI11" ( _ 
  2401.     ByVal d As Long, _ 
  2402.     ByVal g As Long _ 
  2403. ) As Long
  2404.  
  2405. '//Description
  2406. '//This function will close an opened undo record.
  2407. '//
  2408. '//Input Parameters
  2409. '//Long d            handle of a drawing
  2410. '//
  2411. '//Return Value
  2412. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2413. '//error string.
  2414. '//
  2415. '//See Also
  2416. '//TCWUndoRecordStart, TCWUndoRecordAddGraphic
  2417. '//
  2418. '//Coding Example
  2419. '//
  2420. '//Declaration
  2421. Declare Function TCWUndoRecordEnd lib "TCAPI11" ( _ 
  2422.     ByVal d As Long _ 
  2423. ) As Long
  2424.  
  2425. '//Section
  2426. '//DRAWING - Block Functions
  2427.  
  2428. '//Description
  2429. '//This function will return the handle of a block with the specified
  2430. '//block name.
  2431. '//
  2432. '//Input Parameters
  2433. '//String blockname            name of block to return 
  2434. '//
  2435. '//Return Value
  2436. '//Handle of the block as a Long.
  2437. '//
  2438. '//See Also
  2439. '//
  2440. '//Coding Example
  2441. '//
  2442. '//Declaration
  2443. Declare Function TCWBlockGet lib "TCAPI11" ( _ 
  2444.     ByRef blockname As String _ 
  2445. ) As Long
  2446.  
  2447. '//Description
  2448. '//This function will create a block from the selected graphics.  The block
  2449. '//will be named from the name specified. 
  2450. '//
  2451. '//Input Parameters
  2452. '//String blockname    string for block name 
  2453. '//
  2454. '//Return Value
  2455. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2456. '//error string.
  2457. '// 
  2458. '//See Also
  2459. '//
  2460. '//Coding Example
  2461. '//
  2462. '//Declaration
  2463. Declare Function TCWBlockCreate lib "TCAPI11" ( _ 
  2464.     ByRef blockname As String _ 
  2465. ) As Long
  2466.  
  2467. '//Description
  2468. '//This function will insert a block into the drawing.
  2469. '//
  2470. '//Input Parameters
  2471. '//String blockname    block name to insert 
  2472. '//Double x0            x coordinate for where to insert block
  2473. '//Double y0            y coordinate for where to insert block
  2474. '//Double z0            z coordinate for where to insert block
  2475. '//
  2476. '//Return Value
  2477. '//Returns the handle to the new instance of the block as a Long.
  2478. '//
  2479. '//See Also
  2480. '//
  2481. '//Coding Example
  2482. '//
  2483. '//Declaration
  2484. Declare Function TCWBlockInsert lib "TCAPI11" ( _ 
  2485.     ByRef blockname As String, _ 
  2486.     ByVal x0 As Double, _ 
  2487.     ByVal y0 As Double, _ 
  2488.     ByVal z0 As Double _ 
  2489. ) As Long
  2490.  
  2491. '//Section
  2492. '//DRAWING - Get and Set Property Functions
  2493.  
  2494. '//Description
  2495. '//This function will return the value of the property that has been
  2496. '//requested.  This function is written in Basic due to problems with Enable
  2497. '//not supporting Variants with DLLs.
  2498. '//
  2499. '//Input Parameters
  2500. '//String propertyname        name of property look up 
  2501. '//
  2502. '//AVAILABLE PROPERTIES:        DESCRIPTION:
  2503. '//"PenColor"                pen color as &H00bbggrr or -3 for by layer, -4 for by block
  2504. '//"PenWidth"                pen width as a Double
  2505. '//"PenScale"                pen scale as a Double
  2506. '//"PenStyle"                pen style as a Integer 
  2507. '//"BrushColor"                brush color as &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen
  2508. '//"BrushScale"                brush scale as a Double
  2509. '//"BrushAngle"                brush angle as a Double
  2510. '//"BrushStyle"                brush style as a Double
  2511. '//"TextStyle"                flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps
  2512. '//"ScaleSystem"                0 for world, 1 for paper, 2 for device
  2513. '//"BrushDrawMode"            brush drawing mode as n Integer
  2514. '//"PenAlignment"            pen alignment as a String
  2515. '//"HatchCross"                hatch cross as an Integer
  2516. '//"Layer"                    layer id as an Integer
  2517. '//"Info"                    info string as a String
  2518. '//"TextFont"                text font as a String
  2519. '//"TextFormat"                0 for left justify, 1 for center, 2 for right justify
  2520. '//"TextSize"                text size as a Double
  2521. '//
  2522. '//Return Value
  2523. '//Value of property requested.
  2524. '//
  2525. '//AVAILABLE PROPERTIES:        VALUE RETURNED:
  2526. '//"PenColor"                (Long)
  2527. '//"PenWidth"                (Double)
  2528. '//"PenScale"                (Double)
  2529. '//"PenStyle"                (Integer) 
  2530. '//"BrushColor"                (Long)
  2531. '//"BrushScale"                (Double)
  2532. '//"BrushAngle"                (Double)
  2533. '//"BrushStyle"                (Double)
  2534. '//"TextStyle"                (Integer)
  2535. '//"ScaleSystem"                (Integer)
  2536. '//"BrushDrawMode"            (Integer)
  2537. '//"PenAlignment"            (String)
  2538. '//"HatchCross"                (Integer)
  2539. '//"Layer"                    (Integer)
  2540. '//"Info"                    (String)
  2541. '//"TextFont"                (String)
  2542. '//"TextFormat"                (Integer)
  2543. '//"TextSize"                (Double)
  2544. '//
  2545. '//See Also
  2546. '//
  2547. '//Coding Example
  2548. '//
  2549. '//Declaration
  2550. '//Declare Function TCWDrawingPropertyGet ( _ 
  2551. '//    ByRef propertyname As String _ 
  2552. '//)As Variant
  2553.  
  2554. '//Description
  2555. '//This function will set the property with the specified value.
  2556. '//
  2557. '//Input Parameters
  2558. '//String propertyname        name of property to modify 
  2559. '//Variant value                value to set to 
  2560. '//
  2561. '//AVAILABLE PROPERTIES:        DESCRIPTION:
  2562. '//"PenColor"                pen color as &H00bbggrr or -3 for by layer, -4 for by block
  2563. '//"PenWidth"                pen width as a Double
  2564. '//"PenScale"                pen scale as a Double
  2565. '//"PenStyle"                pen style as a Integer 
  2566. '//"BrushColor"                brush color as &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen
  2567. '//"BrushScale"                brush scale as a Double
  2568. '//"BrushAngle"                brush angle as a Double
  2569. '//"BrushStyle"                brush style as a Double
  2570. '//"TextStyle"                flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps
  2571. '//"ScaleSystem"                0 for world, 1 for paper, 2 for device
  2572. '//"BrushDrawMode"            brush drawing mode as n Integer
  2573. '//"PenAlignment"            pen alignment as a String
  2574. '//"HatchCross"                hatch cross as an Integer
  2575. '//"Layer"                    layer id as an Integer
  2576. '//"Info"                    info string as a String
  2577. '//"TextFont"                text font as a String
  2578. '//"TextFormat"                0 for left justify, 1 for center, 2 for right justify
  2579. '//"TextSize"                text size as a Double
  2580. '//
  2581. '//Return Value
  2582. '//0 if no errors.  Non-zero if errors.  Use TCWLastErrorGet to retrieve error string.
  2583. '//
  2584. '//See Also
  2585. '//
  2586. '//Coding Example
  2587. '//
  2588. '//Declaration
  2589. '//Declare Function TCWDrawingPropertySet ( _ 
  2590. '//    ByRef propertyname As String, _ 
  2591. '//    ByVal value As Variant _ 
  2592. '//)As Long
  2593.  
  2594. '//Section
  2595. '//GRAPHICS - Graphic Functions
  2596.  
  2597. '//Description
  2598. '//This function will return the number of graphics in the drawing or it will return 
  2599. '//the number of graphics contained in a graphic.  If you supply a drawing handle as 
  2600. '//the first parameter to the function, the count will be the number of top level
  2601. '//graphics in the drawing.  If you supply a graphic handle as the first parameter to 
  2602. '//the function, the count will be the number of graphics contained in the graphic.
  2603. '//This function can be used with TCWGraphicAt to cycle through all the graphics in the 
  2604. '//drawing or graphic.
  2605. '//
  2606. '//Input Parameters
  2607. '//Long handle            handle of the drawing or graphic
  2608. '//
  2609. '//Return Value
  2610. '//Number of graphics in the drawing or graphic as a Long.
  2611. '//
  2612. '//See Also
  2613. '//TCWGraphicAt
  2614. '//
  2615. '//Coding Example
  2616. '//
  2617. '//Declaration
  2618. Declare Function TCWGraphicCount lib "TCAPI11" ( _ 
  2619.     ByVal d As Long _ 
  2620. ) As Long
  2621.  
  2622. '//Description
  2623. '//This function will return the handle to the requested graphic.  The index
  2624. '//should be a number from 0 to the value-1 returned by TCWGraphicCount.  If you
  2625. '//are cycling through the graphics in the drawing, use the drawing handle you
  2626. '//used with TCWGraphicCount.  If you are cycling through the graphics within a
  2627. '//graphic, use the graphic handle you used with TCWGraphicCount.
  2628. '//
  2629. '//Input Parameters
  2630. '//Long handle        handle to a drawing or a graphic
  2631. '//Long index        requested graphic index
  2632. '//
  2633. '//Return Value
  2634. '//Handle of the graphic as a Long.
  2635. '//
  2636. '//See Also
  2637. '//
  2638. '//Coding Example
  2639. '//
  2640. '//Declaration
  2641. Declare Function TCWGraphicAt lib "TCAPI11" ( _ 
  2642.     ByVal d As Long, _ 
  2643.     ByVal index As Long _ 
  2644. ) As Long
  2645.  
  2646. '//Description
  2647. '//This function will add a graphic to the active drawing.
  2648. '//
  2649. '//Input Parameters
  2650. '//Long g1            if NULL, add to drawing, otherwise add graphic to this parent graphic
  2651. '//Long g2            graphic to add to drawing 
  2652. '//
  2653. '//Return Value
  2654. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2655. '//error string.
  2656. '//
  2657. '//See Also
  2658. '//
  2659. '//Coding Example
  2660. '//
  2661. '//Declaration
  2662. Declare Function TCWGraphicAppend lib "TCAPI11" ( _ 
  2663.     ByVal g1 As Long, _ 
  2664.     ByVal g2 As Long _ 
  2665. ) As Long
  2666.  
  2667. '//Description
  2668. '//This function will add the next segment to the multiline that is in
  2669. '//progress.
  2670. '//
  2671. '//Input Parameters
  2672. '//Long g            graphic to add next point to
  2673. '//Double x0            X coordinate of point
  2674. '//Double y0            Y coordinate of point
  2675. '//Double z0            Z coordinate of point
  2676. '//
  2677. '//Return Value
  2678. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2679. '//error string.
  2680. '//
  2681. '//See Also
  2682. '//TCWGraphicClose, TCWGraphicVertexAdd
  2683. '//
  2684. '//Coding Example
  2685. '//
  2686. '//Declaration
  2687. Declare Function TCWGraphicXYZAdd lib "TCAPI11" ( _ 
  2688.     ByVal g As Long, _ 
  2689.     ByVal x0 As Double, _ 
  2690.     ByVal y0 As Double, _ 
  2691.     ByVal z0 As Double _ 
  2692. ) As Long
  2693.  
  2694. '//Description
  2695. '//This function will close the multiline, making the last point the same
  2696. '//as the first point.
  2697. '//
  2698. '//Input Parameters
  2699. '//Long g            graphic to close 
  2700. '//
  2701. '//Return Value
  2702. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2703. '//error string.
  2704. '//
  2705. '//See Also
  2706. '//TCWGraphicXYZAdd, TCWGraphicVertexAdd
  2707. '//
  2708. '//Coding Example
  2709. '//
  2710. '//Declaration
  2711. Declare Function TCWGraphicClose lib "TCAPI11" ( _ 
  2712.     ByVal g As Long _ 
  2713. ) As Long
  2714.  
  2715. '//Description
  2716. '//This function will add a vertex to a graphic in the active drawing.
  2717. '//
  2718. '//Input Parameters
  2719. '//Long g            graphic 
  2720. '//Long v            vertex to add to graphic 
  2721. '//
  2722. '//Return Value
  2723. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2724. '//error string.
  2725. '//
  2726. '//See Also
  2727. '//
  2728. '//Coding Example
  2729. '//
  2730. '//Declaration
  2731. Declare Function TCWGraphicVertexAdd lib "TCAPI11" ( _ 
  2732.     ByVal g As Long, _ 
  2733.     ByVal v As Long _ 
  2734. ) As Long
  2735.  
  2736. '//Description
  2737. '//This function will add a vertex to the specified graphic.
  2738. '//
  2739. '//Input Parameters
  2740. '//Long g            handle of graphic 
  2741. '//Double x0            X coordinate of vertex
  2742. '//Double y0            Y coordinate of vertex
  2743. '//Double z0            Z coordinate of vertex
  2744. '//
  2745. '//Return Value
  2746. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2747. '//error string.
  2748. '//
  2749. '//See Also
  2750. '//
  2751. '//Coding Example
  2752. '//
  2753. '//Declaration
  2754. Declare Function TCWVertexAppend lib "TCAPI11" ( _ 
  2755.     ByVal g As Long, _ 
  2756.     ByVal x0 As Double, _ 
  2757.     ByVal y0 As Double, _ 
  2758.     ByVal z0 As Double _ 
  2759. ) As Long
  2760.  
  2761. '//Description
  2762. '//This function will make a new graphic with the same properties as
  2763. '//the specified graphic.  The graphic is not added to the drawing.  You
  2764. '//must explicitly do this.  Use TCWGraphicAppend with the first parameter
  2765. '//NULL to add the graphic to the drawing.  use TCWGraphicApend with the
  2766. '//first parameter being the handle of the graphic that will be the 
  2767. '//parent of the appended graphic.
  2768. '//
  2769. '//Input Parameters
  2770. '//Long g            graphic to copy
  2771. '//
  2772. '//Return Value
  2773. '//Returns the handle to the new graphic as a Long.
  2774. '//
  2775. '//See Also
  2776. '//
  2777. '//Coding Example
  2778. '//
  2779. '//Declaration
  2780. Declare Function TCWGraphicCopy lib "TCAPI11" ( _ 
  2781.     ByVal g As Long _ 
  2782. ) As Long
  2783.  
  2784. '//Description
  2785. '//This function will delete the specified graphic.  
  2786. '//
  2787. '//Input Parameters
  2788. '//Long g            graphic to delete
  2789. '//
  2790. '//Return Value
  2791. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2792. '//error string.
  2793. '//
  2794. '//See Also
  2795. '//
  2796. '//Coding Example
  2797. '//
  2798. '//Declaration
  2799. Declare Function TCWGraphicDispose lib "TCAPI11" ( _ 
  2800.     ByVal g As Long _ 
  2801. ) As Long
  2802.  
  2803. '//Description
  2804. '//This function will create a new graphic with the default drawing setting. TurboCAD internal 
  2805. '//types available are GK_GRAPHIC = 11 (polyline) and GK_ARC = 2. 
  2806. '//
  2807. '//If you create your own Smart Object (TurboCAD v4 custom shapes), then supply the appropriate 
  2808. '//regen name for the object (use GK_GRAPHIC for the kind).
  2809. '//
  2810. '//Input Parameters
  2811. '//Long kind                kind of graphic to make
  2812. '//String regenmethod    Regen method if external regenerated graphic, use "" if TurboCAD type 
  2813. '//
  2814. '//Return Value
  2815. '//Returns the handle to the new graphic as a Long.
  2816. '//
  2817. '//See Also
  2818. '//
  2819. '//Coding Example
  2820. '//
  2821. '//Declaration
  2822. Declare Function TCWGraphicCreate lib "TCAPI11" ( _ 
  2823.     ByVal kind As Long, _ 
  2824.     ByRef regenmethod As String _ 
  2825. ) As Long
  2826.  
  2827. '//Description
  2828. '//This function will draw the graphic on the drawing.
  2829. '//
  2830. '//Input Parameters
  2831. '//Long g            handle of graphic
  2832. '//Long mode            0 is normal and 1 is inverted
  2833. '//
  2834. '//Return Value
  2835. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2836. '//error string.
  2837. '//
  2838. '//See Also
  2839. '//
  2840. '//Coding Example
  2841. '//
  2842. '//Declaration
  2843. Declare Function TCWGraphicDraw lib "TCAPI11" ( _ 
  2844.     ByVal g As Long, _ 
  2845.     ByVal mode As Long _ 
  2846. ) As Long
  2847.  
  2848. '//Description
  2849. '//This function will return the graphic handle from the unique database id.
  2850. '//
  2851. '//Input Parameters
  2852. '//Long id            unique id of graphic
  2853. '//
  2854. '//Return Value
  2855. '// The handle of the graphic.  If 0, use TCWLastErrorGet to retrieve error string.
  2856. '//
  2857. '//See Also
  2858. '//
  2859. '//Coding Example
  2860. '//
  2861. '//Declaration
  2862. Declare Function TCWGraphicHandleFromID lib "TCAPI11" ( _ 
  2863.     ByVal id As Long _ 
  2864. ) As Long
  2865.  
  2866. '//Description
  2867. '//This function will set the graphic's reference point, using the 
  2868. '//vertex supplied.
  2869. '//
  2870. '//Input Parameters
  2871. '//Long g            graphic handle
  2872. '//Long v            vertex for new reference point
  2873. '//
  2874. '//Return Value
  2875. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2876. '//error string.
  2877. '//
  2878. '//See Also
  2879. '//
  2880. '//Coding Example
  2881. '//
  2882. '//Declaration
  2883. Declare Function TCWGraphicReferencePointSet lib "TCAPI11" ( _ 
  2884.     ByVal g As Long, _ 
  2885.     ByVal v As Long _ 
  2886. ) As Long
  2887.  
  2888. '//Description
  2889. '//This function will return the graphic reference point.
  2890. '//
  2891. '//Input Parameters
  2892. '//Long g            graphic handle
  2893. '//
  2894. '//Return Value
  2895. '//The the reference point vertex handle as a long.  If 0, use TCWLastErrorGet to
  2896. '//retrieve the error text.
  2897. '//
  2898. '//See Also
  2899. '//
  2900. '//Coding Example
  2901. '//
  2902. '//Declaration
  2903. Declare Function TCWGraphicReferencePointGet lib "TCAPI11" ( _ 
  2904.     ByVal g As Long _ 
  2905. ) As Long
  2906.  
  2907. '//Section
  2908. '//GRAPHICS - Selection Manipulation Functions
  2909.  
  2910. '//The following group of functions work on the currently selected graphics in the
  2911. '//drawing.  They can be used in conjunction with TCWSelectionCount and TCWSelectionAt
  2912. '//to cycle through all the graphics in the drawing.
  2913.  
  2914. '//Description
  2915. '//Will scale the selected graphics in the x, y and z direction. A value of 1.0 in
  2916. '//any parameter will not change the scale.
  2917. '//
  2918. '//Input Parameters
  2919. '//Double xscale            X scale factor
  2920. '//Double yscale            Y scale factor
  2921. '//Double zscale            Z scale factor
  2922. '//Double x0                x coordinate of reference point
  2923. '//Double y0                y coordinate of reference point
  2924. '//Double z0                z coordinate of reference point
  2925. '//
  2926. '//Return Value
  2927. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2928. '//error string.
  2929. '//
  2930. '//See Also
  2931. '//
  2932. '//Coding Example
  2933. '//
  2934. '//Declaration
  2935. Declare Function TCWSelectionScale lib "TCAPI11" ( _ 
  2936.     ByVal xscale As Double, _ 
  2937.     ByVal yscale As Double, _ 
  2938.     ByVal zscale As Double, _ 
  2939.     ByVal x0 As Double, _ 
  2940.     ByVal y0 As Double, _ 
  2941.     ByVal z0 As Double _ 
  2942. ) As Long
  2943.  
  2944. '//Description
  2945. '//This function will move the selected graphic to the new coordinates.
  2946. '//
  2947. '//Input Parameters
  2948. '//Double dx            delta x coordinate to move selected graphic
  2949. '//Double dy            delta y coordinate to move selected graphic
  2950. '//Double dz            delta z coordinate to move selected graphic
  2951. '//
  2952. '//Return Value
  2953. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2954. '//error string.
  2955. '//
  2956. '//See Also
  2957. '//
  2958. '//Coding Example
  2959. '//
  2960. '//Declaration
  2961. Declare Function TCWSelectionMove lib "TCAPI11" ( _ 
  2962.     ByVal dx As Double, _ 
  2963.     ByVal dy As Double, _ 
  2964.     ByVal dz As Double _ 
  2965. ) As Long
  2966.  
  2967. '//Description
  2968. '//This function will rotate the selected graphics by the rotation angle
  2969. '//supplied.
  2970. '//
  2971. '//Input Parameters
  2972. '//String axis        "X", "Y", or "Z" where "X" means rotate in the Y-Z plane
  2973. '//Double angle        rotation angle in radians
  2974. '//Double x0            x coordinate of reference point
  2975. '//Double y0            y coordinate of reference point
  2976. '//Double z0            z coordinate of reference point
  2977. '//
  2978. '//Return Value
  2979. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  2980. '//error string.
  2981. '//
  2982. '//See Also
  2983. '//
  2984. '//Coding Example
  2985. '//
  2986. '//Declaration
  2987. Declare Function TCWSelectionRotate lib "TCAPI11" ( _ 
  2988.     ByRef axis As String, _ 
  2989.     ByVal angle As Double, _ 
  2990.     ByVal x0 As Double, _ 
  2991.     ByVal y0 As Double, _ 
  2992.     ByVal z0 As Double _ 
  2993. ) As Long
  2994.  
  2995. '//Description
  2996. '//This function will apply a hatch pattern to the selected graphics.
  2997. '//
  2998. '//Input Parameters
  2999. '//None
  3000. '//
  3001. '//Return Value
  3002. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3003. '//error string.
  3004. '//
  3005. '//See Also
  3006. '//
  3007. '//Coding Example
  3008. '//
  3009. '//Declaration
  3010. Declare Function TCWCreateHatch lib "TCAPI11" () As Long
  3011.  
  3012. '//Description
  3013. '//This function will create a group out of the selected graphics.
  3014. '//
  3015. '//Input Parameters
  3016. '//String groupname    name of group 
  3017. '//
  3018. '//Return Value
  3019. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3020. '//error string.
  3021. '//
  3022. '//See Also
  3023. '//
  3024. '//Coding Example
  3025. '//
  3026. '//Declaration
  3027. Declare Function TCWGroupCreate lib "TCAPI11" ( _ 
  3028.     ByRef groupname As String _ 
  3029. ) As Long
  3030.  
  3031. '//Description
  3032. '//This function will explode a selected group or block into its individual 
  3033. '//graphics. If the selected graphic is a simple graphic such as a line, the 
  3034. '//function has no effect.
  3035. '//
  3036. '//Input Parameters
  3037. '//None
  3038. '//
  3039. '//Return Value
  3040. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3041. '//error string.
  3042. '//
  3043. '//See Also
  3044. '//
  3045. '//Coding Example
  3046. '//
  3047. '//Declaration
  3048. Declare Function TCWExplode lib "TCAPI11" () As Long
  3049.  
  3050. '//Description
  3051. '//This function will move the selected graphics to the front of the drawing.
  3052. '//
  3053. '//Input Parameters
  3054. '//None
  3055. '//
  3056. '//Return Value
  3057. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3058. '//error string.
  3059. '//
  3060. '//See Also
  3061. '//
  3062. '//Coding Example
  3063. '//
  3064. '//Declaration
  3065. Declare Function TCWBringtoFront lib "TCAPI11" () As Long
  3066.  
  3067. '//Description
  3068. '//This function will move the selected graphics to the back of the drawing.
  3069. '//
  3070. '//Input Parameters
  3071. '//None
  3072. '//
  3073. '//Return Value
  3074. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3075. '//error string.
  3076. '//
  3077. '//See Also
  3078. '//
  3079. '//Coding Example
  3080. '//
  3081. '//Declaration
  3082. Declare Function TCWSendtoBack lib "TCAPI11" () As Long
  3083.  
  3084. '//Description
  3085. '//This function will align the bottoms of the selected graphics.
  3086. '//
  3087. '//Input Parameters
  3088. '//None
  3089. '//
  3090. '//Return Value
  3091. '//Returns the handle of the first selected graphic as a Long.
  3092. '//
  3093. '//See Also
  3094. '//
  3095. '//Coding Example
  3096. '//
  3097. '//Declaration
  3098. Declare Function TCWAlignBottom lib "TCAPI11" () As Long
  3099.  
  3100. '//Description
  3101. '//This function will align the tops of the selected graphics.
  3102. '//
  3103. '//Input Parameters
  3104. '//
  3105. '//Return Value
  3106. '//Returns the handle of the first selected graphic as a Long.
  3107. '//
  3108. '//See Also
  3109. '//
  3110. '//Coding Example
  3111. '//
  3112. '//Declaration
  3113. Declare Function TCWAlignTop lib "TCAPI11" () As Long
  3114.  
  3115. '//Description
  3116. '//This function will align the middles of the selected graphics.
  3117. '//
  3118. '//Input Parameters
  3119. '//None
  3120. '//
  3121. '//Return Value
  3122. '//Returns the handle of the first selected graphic as a Long.
  3123. '//
  3124. '//See Also
  3125. '//
  3126. '//Coding Example
  3127. '//
  3128. '//Declaration
  3129. Declare Function TCWAlignMiddle lib "TCAPI11" () As Long
  3130.  
  3131. '//Description
  3132. '//This function will align the left sides of the selected graphics.
  3133. '//
  3134. '//Input Parameters
  3135. '//None
  3136. '//
  3137. '//Return Value
  3138. '//Returns the handle of the first selected graphic as a Long.
  3139. '//
  3140. '//See Also
  3141. '//
  3142. '//Coding Example
  3143. '//
  3144. '//Declaration
  3145. Declare Function TCWAlignLeft lib "TCAPI11" () As Long
  3146.  
  3147. '//Description
  3148. '//This function will align the right sides of the selected graphics.
  3149. '//
  3150. '//Input Parameters
  3151. '//None
  3152. '//
  3153. '//Return Value
  3154. '//Returns the handle of the first selected graphic as a Long.
  3155. '//
  3156. '//See Also
  3157. '//
  3158. '//Coding Example
  3159. '//
  3160. '//Declaration
  3161. Declare Function TCWAlignRight lib "TCAPI11" () As Long
  3162.  
  3163. '//Description
  3164. '//This function will align the centers of the selected graphics.
  3165. '//
  3166. '//Input Parameters
  3167. '//None
  3168. '//
  3169. '//Return Value
  3170. '//Returns the handle of the first selected graphic as a Long.
  3171. '//
  3172. '//See Also
  3173. '//
  3174. '//Coding Example
  3175. '//
  3176. '//Declaration
  3177. Declare Function TCWAlignCenter lib "TCAPI11" () As Long
  3178.  
  3179. '//Section
  3180. '//GRAPHICS - Get and Set Property Functions
  3181.  
  3182. '//Description
  3183. '//This function will return the value of the property that has been
  3184. '//requested.  This function is written in Basic because of limitations
  3185. '//within Enable Basic for Variants and DLLs.
  3186. '//
  3187. '//Input Parameters 
  3188. '//Long graphic            graphic to get property from
  3189. '//String propertyname    name of property look up 
  3190. '//
  3191. '//AVAILABLE PROPERTIES:        DESCRIPTION:
  3192. '//"BrushAngle"                brush angle as a Double
  3193. '//"BrushColor"                brush color as &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen
  3194. '//"BrushDrawMode"            brush drawing mode as n Integer
  3195. '//"BrushScale"                brush scale as a Double
  3196. '//"BrushStyle"                brush style as a Double
  3197. '//"DatabaseID"                unique id for graphic
  3198. '//"HatchCross"                hatch cross as an Integer
  3199. '//"Info"                    info string as a String
  3200. '//"Layer"                    layer id as an Integer
  3201. '//"LimitVertices"            if true, node-edit cannot insert or delete vertices
  3202. '//"PenAlignment"            pen alignment as a String
  3203. '//"PenColor"                pen color as &H00bbggrr or -3 for by layer, -4 for by block
  3204. '//"PenScale"                pen scale as a Double
  3205. '//"PenStyle"                pen style as a Integer 
  3206. '//"PenWidth"                pen width as a Double
  3207. '//"ScaleSystem"                0 for world, 1 for paper, 2 for device
  3208. '//"Selected"                selected flag as a Long
  3209. '//"TextFont"                text font as a String
  3210. '//"TextFormat"                0 for left justify, 1 for center, 2 for right justify
  3211. '//"TextSize"                text size as a Double
  3212. '//"TextStyle"                flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps
  3213. '//
  3214. '//"Closed"                    closed flag as a Long (READ ONLY)
  3215. '//"Kind"                    graphic type as a Long (READ ONLY)
  3216. '//"RegenMethod"                regen method name as a String (READ ONLY)
  3217. '//
  3218. '//Return Value
  3219. '//Value of property requested.
  3220. '//
  3221. '//AVAILABLE PROPERTIES:        VALUE RETURNED:
  3222. '//"BrushAngle"                (Double)
  3223. '//"BrushColor"                (Long)
  3224. '//"BrushDrawMode"            (Integer)
  3225. '//"BrushScale"                (Double)
  3226. '//"BrushStyle"                (Double)
  3227. '//"DatabaseID"                (Long)
  3228. '//"HatchCross"                (Integer)
  3229. '//"Info"                    (String)
  3230. '//"Layer"                    (Integer)
  3231. '//"LimitVertices"            (Integer)
  3232. '//"PenAlignment"            (String)
  3233. '//"PenColor"                (Long)
  3234. '//"PenScale"                (Double)
  3235. '//"PenStyle"                (Integer)
  3236. '//"PenWidth"                (Double)
  3237. '//"ScaleSystem"                (Integer)
  3238. '//"Selected"                -1 if selected, 0 if not (Long)
  3239. '//"TextFont"                (String)
  3240. '//"TextFormat"                (Integer)
  3241. '//"TextSize"                (Double)
  3242. '//"TextStyle"                (Integer)
  3243. '//
  3244. '//"Closed"                    -1 if closed, 0 if not  (Long - READ ONLY)
  3245. '//"Kind"                    GK_nnnnn (Long - READ ONLY)
  3246. '//"RegenMethod"                (String - READ ONLY)
  3247. '//See Also
  3248. '//
  3249. '//Coding Example
  3250. '//
  3251. '//Declaration
  3252. '//Declare Function TCWGraphicPropertyGet ( _ 
  3253. '//    ByVal g As Long, _ 
  3254. '//    ByRef propertyname As String _ 
  3255. '//)As Variant
  3256.  
  3257.  
  3258. '//Description
  3259. '//This function will set the property with the specified value.
  3260. '//
  3261. '//Input Parameters
  3262. '//Long graphic                graphic to set property for
  3263. '//String propertyname        name of property to modify
  3264. '//Variant value                value to set to 
  3265. '//
  3266. '//AVAILABLE PROPERTIES:            VALUE:
  3267. '//"BrushAngle"                    (Double)    
  3268. '//"BrushColor"                    &H00bbggrr or -3 for by layer, -4 for by block or -5 for by pen (Long)    
  3269. '//"BrushDrawMode"                (Integer)    
  3270. '//"BrushScale"                    (Double)    
  3271. '//"BrushStyle"                    (Integer)    
  3272. '//"DatabaseID"                    (Long)
  3273. '//"HatchCross"                    (Integer)
  3274. '//"Info"                        (String)    
  3275. '//"Layer"                        (Integer)    
  3276. '//"LimitVertices"                (Integer)if true, node-edit cannot insert or delete vertices
  3277. '//"PenAlignment"                (String)
  3278. '//"PenColor"                    &H00bbggrr or -3 for by layer, -4 for by block (Long)
  3279. '//"PenWidth"                    1.5 (Double)
  3280. '//"PenScale"                    1 (Double)
  3281. '//"PenStyle"                    (Integer)    
  3282. '//"ScaleSystem"                    0 for world, 1 for paper, 2 for device (Integer)
  3283. '//"Selected"                    1 to select, 0 to deselect (Integer)
  3284. '//"TextStyle"                    flags: &H0000 = regular, &H0001 = italic, &H0002 = bold, &H0004 = strikethru, &H0008 = hidden, &H0040 = allcaps (Integer)    
  3285. '//"TextFont"                    (String)    
  3286. '//"TextFormat"                    0 for left justify, 1 for center, 2 for right justify (Integer)    
  3287. '//"TextSize"                    (Double)    
  3288. '//
  3289. '//Return Value
  3290. '//0 if no errors.  Non-zero if errors.  Use TCWLastErrorGet to retrieve error string.
  3291. '//
  3292. '//See Also
  3293. '//
  3294. '//Coding Example
  3295. '//
  3296. '//Declaration
  3297. '//Declare Function TCWGraphicPropertySet ( _ 
  3298. '//    ByVal graphic As Long, _ 
  3299. '//    ByRef propertyname As String, _ 
  3300. '//    ByVal value As Variant
  3301. '//)As Long
  3302.  
  3303.  
  3304. '//Section
  3305. '//GRAPHICS - Vertex Functions
  3306.  
  3307. '//Description
  3308. '//This function will return the number vertices in the specified graphic.
  3309. '//
  3310. '//Input Parameters
  3311. '//Long g            graphic to count vertices in 
  3312. '//
  3313. '//Return Value
  3314. '//Number of vertices as a Long.
  3315. '//
  3316. '//See Also
  3317. '//
  3318. '//Coding Example
  3319. '//
  3320. '//Declaration
  3321. Declare Function TCWVertexCount lib "TCAPI11" ( _ 
  3322.     ByVal g As Long _ 
  3323. ) As Long
  3324.  
  3325. '//Description
  3326. '//This function will return the handle to the vertex requested.  Valid index
  3327. '//numbers are 0 to the number-1 returned by VertexCount.
  3328. '//
  3329. '//Input Parameters
  3330. '//Long g            graphic to get vertex from
  3331. '//Long index        vertex to return
  3332. '//
  3333. '//Return Value
  3334. '//Handle to vertex as a Long.
  3335. '//
  3336. '//See Also
  3337. '//
  3338. '//Coding Example
  3339. '//
  3340. '//Declaration
  3341. Declare Function TCWVertexAt lib "TCAPI11" ( _ 
  3342.     ByVal g As Long, _ 
  3343.     ByVal index As Long _ 
  3344. ) As Long
  3345.  
  3346. '//Description
  3347. '//This function will create a new vertex at the specified coordinates.
  3348. '//
  3349. '//Caller is responsible for disposing of this object unless it is added to a graphic.
  3350. '//
  3351. '//Input Parameters
  3352. '//Double x0            X coordinate of vertex
  3353. '//Double y0            Y coordinate of vertex
  3354. '//Double z0            Z coordinate of vertex
  3355. '//
  3356. '//Return Value
  3357. '//Returns the handle to the new vertex as a Long.  
  3358. '//
  3359. '//See Also
  3360. '//
  3361. '//Coding Example
  3362. '//
  3363. '//Declaration
  3364. Declare Function TCWVertexCreate lib "TCAPI11" ( _ 
  3365.     ByVal x0 As Double, _ 
  3366.     ByVal y0 As Double, _ 
  3367.     ByVal z0 As Double _ 
  3368. ) As Long
  3369.  
  3370. '//Description
  3371. '//This function will create a new vertex at the coordinates 0,0,0.
  3372. '//
  3373. '//Caller is responsible for disposing of this object unless it is added to a graphic.
  3374. '//
  3375. '//Input Parameters
  3376. '//None
  3377. '//
  3378. '//Return Value
  3379. '//Returns the handle to the new vertex as a Long.  
  3380. '//
  3381. '//See Also
  3382. '//
  3383. '//Coding Example
  3384. '//
  3385. '//Declaration
  3386. Declare Function TCWVertexZero lib "TCAPI11" () As Long
  3387.  
  3388. '//Description
  3389. '//This function will create a new vertex that is initialized to the
  3390. '//same coordinates as the vertex specified.
  3391. '//
  3392. '//Input Parameters
  3393. '//Long v            handle of a vertex to copy
  3394. '//
  3395. '//Return Value
  3396. '//Returns the handle to the new vertex as a Long.  
  3397. '//
  3398. '//See Also
  3399. '//
  3400. '//Coding Example
  3401. '//
  3402. '//Declaration
  3403. Declare Function TCWVertexCopy lib "TCAPI11" ( _ 
  3404.     ByVal v As Long _ 
  3405. ) As Long
  3406.  
  3407. '//Description
  3408. '//This function will delete the specified vertex.  
  3409. '//
  3410. '//Input Parameters
  3411. '//Long v            handle of a vertex to delete
  3412. '//
  3413. '//Return Value
  3414. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3415. '//error string.
  3416. '//
  3417. '//See Also
  3418. '//
  3419. '//Coding Example
  3420. '//
  3421. '//Declaration
  3422. Declare Function TCWVertexDispose lib "TCAPI11" ( _ 
  3423.     ByVal v As Long _ 
  3424. ) As Long
  3425.  
  3426. '//Description
  3427. '//This function will return the X coordinate of a vertex.
  3428. '//
  3429. '//Input Parameters
  3430. '//Long v            handle of a vertex 
  3431. '//
  3432. '//Return Value
  3433. '// X coordinate as a Double. 
  3434. '//
  3435. '//See Also
  3436. '//
  3437. '//Coding Example
  3438. '//
  3439. '//Declaration
  3440. Declare Function TCWGetX lib "TCAPI11" ( _ 
  3441.     ByVal v As Long _ 
  3442. ) As Double
  3443.  
  3444. '//Description
  3445. '//This function will set the X coordinate of a vertex.
  3446. '//
  3447. '//Input Parameters
  3448. '//Long v            handle of a vertex 
  3449. '//Double x0            coordinate value
  3450. '//
  3451. '//Return Value
  3452. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3453. '//error string.
  3454. '//
  3455. '//See Also
  3456. '//
  3457. '//Coding Example
  3458. '//
  3459. '//Declaration
  3460. Declare Function TCWSetX lib "TCAPI11" ( _ 
  3461.     ByVal v As Long, _ 
  3462.     ByVal x0 As Double _ 
  3463. ) As Long
  3464.  
  3465. '//Description
  3466. '//This function will return the Y coordinate of a vertex.
  3467. '//
  3468. '//Input Parameters
  3469. '//Long v            handle of a vertex 
  3470. '//
  3471. '//Return Value
  3472. '//Y coordinate as a Double. 
  3473. '//
  3474. '//See Also
  3475. '//
  3476. '//Coding Example
  3477. '//
  3478. '//Declaration
  3479. Declare Function TCWGetY lib "TCAPI11" ( _ 
  3480.     ByVal v As Long _ 
  3481. ) As Double
  3482.  
  3483. '//Description
  3484. '//This function will set the Y coordinate of a vertex.
  3485. '//
  3486. '//Input Parameters
  3487. '//Long v            handle of a vertex 
  3488. '//Double y0            coordinate value
  3489. '//
  3490. '//Return Value
  3491. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3492. '//error string.
  3493. '//
  3494. '//See Also
  3495. '//
  3496. '//Coding Example
  3497. '//
  3498. '//Declaration
  3499. Declare Function TCWSetY lib "TCAPI11" ( _ 
  3500.     ByVal v As Long, _ 
  3501.     ByVal y0 As Double _ 
  3502. ) As Long
  3503.  
  3504. '//Description
  3505. '//This function will return the Z coordinate of a vertex.
  3506. '//
  3507. '//Input Parameters
  3508. '//Long v            handle of a vertex 
  3509. '//
  3510. '//Return Value
  3511. '//Z coordinate as a Double. 
  3512. '//
  3513. '//See Also
  3514. '//
  3515. '//Coding Example
  3516. '//
  3517. '//Declaration
  3518. Declare Function TCWGetZ lib "TCAPI11" ( _ 
  3519.     ByVal v As Long _ 
  3520. ) As Double
  3521.  
  3522. '//Description
  3523. '//This function will set the Z coordinate of a vertex.
  3524. '//
  3525. '//Input Parameters
  3526. '//Long v            handle of a vertex 
  3527. '//Double z0            coordinate value
  3528. '//
  3529. '//Return Value
  3530. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3531. '//error string.
  3532. '//
  3533. '//See Also
  3534. '//
  3535. '//Coding Example
  3536. '//
  3537. '//Declaration
  3538. Declare Function TCWSetZ lib "TCAPI11" ( _ 
  3539.     ByVal v As Long, _ 
  3540.     ByVal z0 As Double _ 
  3541. ) As Long
  3542.  
  3543. '//Description
  3544. '//This function will set the X and Y coordinates of a vertex.
  3545. '//
  3546. '//Input Parameters
  3547. '//Long v            handle of a vertex 
  3548. '//Double x0            x coordinate value
  3549. '//Double y0            y coordinate value
  3550. '//
  3551. '//Return Value
  3552. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3553. '//error string.
  3554. '//
  3555. '//See Also
  3556. '//
  3557. '//Coding Example
  3558. '//
  3559. '//Declaration
  3560. Declare Function TCWSetXY lib "TCAPI11" ( _ 
  3561.     ByVal v As Long, _ 
  3562.     ByVal x0 As Double, _ 
  3563.     ByVal y0 As Double _ 
  3564. ) As Long
  3565.  
  3566. '//Description
  3567. '//This function will set the X, Y and Z coordinates of a vertex.
  3568. '//
  3569. '//Input Parameters
  3570. '//Long v            handle of a vertex 
  3571. '//Double x0            x coordinate value
  3572. '//Double y0            y coordinate value
  3573. '//Double z0            z coordinate value
  3574. '//
  3575. '//Return Value
  3576. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3577. '//error string.
  3578. '//
  3579. '//See Also
  3580. '//
  3581. '//Coding Example
  3582. '//
  3583. '//Declaration
  3584. Declare Function TCWSetXYZ lib "TCAPI11" ( _ 
  3585.     ByVal v As Long, _ 
  3586.     ByVal x0 As Double, _ 
  3587.     ByVal y0 As Double, _ 
  3588.     ByVal z0 As Double _ 
  3589. ) As Long
  3590.  
  3591. '//Description
  3592. '//This function will set the state for the pen.  Sets the up or down
  3593. '//state of the pen at the specified vertex.
  3594. '//
  3595. '//Input Parameters
  3596. '//Long v            handle of a vertex 
  3597. '//Long state        TRUE if pen should be down 
  3598. '//
  3599. '//Return Value
  3600. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3601. '//error string.
  3602. '//
  3603. '//See Also
  3604. '//
  3605. '//Coding Example
  3606. '//
  3607. '//Declaration
  3608. Declare Function TCWPenDown lib "TCAPI11" ( _ 
  3609.     ByVal v As Long, _ 
  3610.     ByVal state As Long _ 
  3611. ) As Long
  3612.  
  3613. '//Section
  3614. '//VIEW - Functions
  3615.  
  3616. '//Description
  3617. '//This function will activate the specified view.
  3618. '//
  3619. '//Input Parameters
  3620. '//Long index        view number
  3621. '//
  3622. '//Return Value
  3623. '//Returns the handle to the view as a Long. 
  3624. '//
  3625. '//See Also
  3626. '//TCWViewCount, TCWViewActive
  3627. '//
  3628. '//Coding Example
  3629. '//
  3630. '//Declaration
  3631. Declare Function TCWViewAt lib "TCAPI11" ( _ 
  3632.     ByVal index As Long _ 
  3633. ) As Long
  3634.  
  3635. '//Description
  3636. '//This function will return the number of views that are open.
  3637. '//
  3638. '//Input Parameters
  3639. '//None
  3640. '//
  3641. '//Return Value
  3642. '//Count of the number of open views as a Long. 
  3643. '//
  3644. '//See Also
  3645. '//TCWViewAt, TCWViewActive
  3646. '//
  3647. '//Coding Example
  3648. '//
  3649. '//Declaration
  3650. Declare Function TCWViewCount lib "TCAPI11" () As Long
  3651.  
  3652. '//Description
  3653. '//This function will return the handle to the active view.
  3654. '//
  3655. '//Input Parameters
  3656. '//None
  3657. '//
  3658. '//Return Value
  3659. '//Handle to view as a Long. 
  3660. '//
  3661. '//See Also
  3662. '//TCWViewAt, TCWViewCount
  3663. '//
  3664. '//Coding Example
  3665. '//
  3666. '//Declaration
  3667. Declare Function TCWViewActive lib "TCAPI11" () As Long
  3668.  
  3669. '//Description
  3670. '//This function will force a redraw on the current view.
  3671. '//
  3672. '//Input Parameters
  3673. '//None
  3674. '//
  3675. '//Return Value
  3676. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3677. '//error string.
  3678. '//
  3679. '//See Also
  3680. '//
  3681. '//Coding Example
  3682. '//
  3683. '//Declaration
  3684. Declare Function TCWViewRedraw lib "TCAPI11" () As Long
  3685.  
  3686. '//Description
  3687. '//This function will flush any remaining paint messages to the view.
  3688. '//
  3689. '//Input Parameters
  3690. '//None
  3691. '//
  3692. '//Return Value
  3693. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3694. '//error string.
  3695. '//
  3696. '//See Also
  3697. '//
  3698. '//Coding Example
  3699. '//
  3700. '//Declaration
  3701. Declare Function TCWViewUpdateWindow lib "TCAPI11" () As Long
  3702.  
  3703. '//Description
  3704. '//This function will zoom the current view to full view.  
  3705. '//
  3706. '//Input Parameters
  3707. '//None
  3708. '//
  3709. '//Return Value
  3710. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3711. '//error string.
  3712. '//
  3713. '//See Also
  3714. '//
  3715. '//Coding Example
  3716. '//
  3717. '//Declaration
  3718. Declare Function TCWViewZoom lib "TCAPI11" () As Long
  3719.  
  3720. '//Description
  3721. '//This function will zoom in the current view.  The amount of zoom is
  3722. '//determined by the zoom factor setting on the Options|Program Setup|General
  3723. '//property page.
  3724. '//
  3725. '//Input Parameters
  3726. '//None
  3727. '//
  3728. '//Return Value
  3729. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3730. '//error string.
  3731. '//
  3732. '//See Also
  3733. '//
  3734. '//Coding Example
  3735. '//
  3736. '//Declaration
  3737. Declare Function TCWViewZoomIn lib "TCAPI11" () As Long
  3738.  
  3739. '//Description
  3740. '//This function will zoom out the current view.  The amount of zoom is
  3741. '//determined by the zoom factor setting on the Options|Program Setup|General
  3742. '//property page.
  3743. '//
  3744. '//Input Parameters
  3745. '//None
  3746. '//
  3747. '//Return Value
  3748. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3749. '//error string.
  3750. '//
  3751. '//See Also
  3752. '//
  3753. '//Coding Example
  3754. '//
  3755. '//Declaration
  3756. Declare Function TCWViewZoomOut lib "TCAPI11" () As Long
  3757.  
  3758. '//Description
  3759. '//This function will zoom to the printed page size.  
  3760. '//
  3761. '//Input Parameters
  3762. '//None
  3763. '//
  3764. '//Return Value
  3765. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3766. '//error string.
  3767. '//
  3768. '//See Also
  3769. '//
  3770. '//Coding Example
  3771. '//
  3772. '//Declaration
  3773. Declare Function TCWViewZoomPage lib "TCAPI11" () As Long
  3774.  
  3775. '//Description
  3776. '//This function will zoom to a view that contains all of the objects in the drawing.  
  3777. '//
  3778. '//Input Parameters
  3779. '//None
  3780. '//
  3781. '//Return Value
  3782. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3783. '//error string.
  3784. '//
  3785. '//See Also
  3786. '//
  3787. '//Coding Example
  3788. '//
  3789. '//Declaration
  3790. Declare Function TCWViewZoomExtents lib "TCAPI11" () As Long
  3791.  
  3792. '//Description
  3793. '//This function will zoom to a view that is bounded by the rectangle points 
  3794. '//specified.  
  3795. '//
  3796. '//Input Parameters
  3797. '//Double x0            X coordinate of top left corner of rectangle
  3798. '//Double y0            Y coordinate of top left corner of rectangle
  3799. '//Double z0            Z coordinate of top left corner of rectangle
  3800. '//Double x1            X coordinate of lower right corner of rectangle
  3801. '//Double y1            Y coordinate of lower right corner of rectangle
  3802. '//Double z1            Z coordinate of lower right corner of rectangle
  3803. '//
  3804. '//Return Value
  3805. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  3806. '//error string.
  3807. '//
  3808. '//See Also
  3809. '//
  3810. '//Coding Example
  3811. '//
  3812. '//Declaration
  3813. Declare Function TCWViewZoomWindow lib "TCAPI11" ( _ 
  3814.     ByVal x0 As Double, _ 
  3815.     ByVal y0 As Double, _ 
  3816.     ByVal z0 As Double, _ 
  3817.     ByVal x1 As Double, _ 
  3818.     ByVal y1 As Double, _ 
  3819.     ByVal z1 As Double _ 
  3820. ) As Long
  3821.  
  3822. '//Description
  3823. '//This function will return x coordinate which represents the bottom left
  3824. '//corner of the view.  
  3825. '//
  3826. '//Input Parameters
  3827. '//None
  3828. '//
  3829. '//Return Value
  3830. '//x coordinate as a Double.
  3831. '//
  3832. '//See Also
  3833. '//TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,
  3834. '//TCWViewExtentsGetZ2
  3835. '//
  3836. '//Coding Example
  3837. '//Find center of screen
  3838. '//    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3839. '//    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3840. '//
  3841. '//    ' Create the empty circle graphic    
  3842. '//    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3843. '//
  3844. '//Declaration
  3845. Declare Function TCWViewExtentsGetX1 lib "TCAPI11" () As Double
  3846.  
  3847. '//Description
  3848. '//This function will return y coordinate which represents the bottom left
  3849. '//corner of the view.  
  3850. '//
  3851. '//Input Parameters
  3852. '//None
  3853. '//
  3854. '//Return Value
  3855. '//y coordinate as a Double.
  3856. '//
  3857. '//See Also
  3858. '//TCWViewExtentsGetX1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,
  3859. '//TCWViewExtentsGetZ2
  3860. '//
  3861. '//Coding Example
  3862. '//Find center of screen
  3863. '//    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3864. '//    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3865. '//
  3866. '//    ' Create the empty circle graphic    
  3867. '//    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3868. '//
  3869. '//Declaration
  3870. Declare Function TCWViewExtentsGetY1 lib "TCAPI11" () As Double
  3871.  
  3872. '//Description
  3873. '//This function will return z coordinate which represents the bottom left
  3874. '//corner of the view.  
  3875. '//
  3876. '//Input Parameters
  3877. '//None
  3878. '//
  3879. '//Return Value
  3880. '//z coordinate as a Double.
  3881. '//
  3882. '//See Also
  3883. '//TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetX2, TCWViewExtentsGetY2,
  3884. '//TCWViewExtentsGetZ2
  3885. '//
  3886. '//Coding Example
  3887. '//Find center of screen
  3888. '//    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3889. '//    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3890. '//
  3891. '//    ' Create the empty circle graphic    
  3892. '//    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3893. '//
  3894. '//Declaration
  3895. Declare Function TCWViewExtentsGetZ1 lib "TCAPI11" () As Double
  3896.  
  3897. '//Description
  3898. '//This function will return x coordinate which represents the top right
  3899. '//corner of the view.  
  3900. '//
  3901. '//Input Parameters
  3902. '//None
  3903. '//
  3904. '//Return Value
  3905. '//x coordinate as a Double.
  3906. '//
  3907. '//See Also
  3908. '//TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetY2,
  3909. '//TCWViewExtentsGetZ2
  3910. '//
  3911. '//Coding Example
  3912. '//Find center of screen
  3913. '//    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3914. '//    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3915. '//
  3916. '//    ' Create the empty circle graphic    
  3917. '//    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3918. '//
  3919. '//Declaration
  3920. Declare Function TCWViewExtentsGetX2 lib "TCAPI11" () As Double
  3921.  
  3922. '//Description
  3923. '//This function will return y coordinate which represents the top right
  3924. '//corner of the view.  
  3925. '//
  3926. '//Input Parameters
  3927. '//None
  3928. '//
  3929. '//Return Value
  3930. '//y coordinate as a Double.
  3931. '//
  3932. '//See Also
  3933. '//TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2,
  3934. '//TCWViewExtentsGetZ2
  3935. '//
  3936. '//Coding Example
  3937. '//Find center of screen
  3938. '//    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3939. '//    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3940. '//
  3941. '//    ' Create the empty circle graphic    
  3942. '//    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3943. '//
  3944. '//Declaration
  3945. Declare Function TCWViewExtentsGetY2 lib "TCAPI11" () As Double
  3946.  
  3947. '//Description
  3948. '//This function will return z coordinate which represents the top right
  3949. '//corner of the view.  
  3950. '//
  3951. '//Input Parameters
  3952. '//None
  3953. '//
  3954. '//Return Value
  3955. '//z coordinate as a Double.
  3956. '//
  3957. '//See Also
  3958. '//TCWViewExtentsGetX1, TCWViewExtentsGetY1, TCWViewExtentsGetZ1, TCWViewExtentsGetX2,
  3959. '//TCWViewExtentsGetY2
  3960. '//
  3961. '//Coding Example
  3962. '//Find center of screen
  3963. '//    xc = (TCWViewExtentsGetX1() + TCWViewExtentsGetX2())/2
  3964. '//    yc = (TCWViewExtentsGetY1() + TCWViewExtentsGetY2())/2    
  3965. '//
  3966. '//    ' Create the empty circle graphic    
  3967. '//    g = TCWCircleCenterAndPoint(xc, yc, 0.0, xc, yc+3, 0.0)    
  3968. '//
  3969. '//Declaration
  3970. Declare Function TCWViewExtentsGetZ2 lib "TCAPI11" () As Double
  3971.  
  3972. '//Section
  3973. '//LAYERS - Management Functions
  3974.  
  3975. '//Description
  3976. '//This function will return the number of layers in the active drawing.
  3977. '//
  3978. '//Input Parameters
  3979. '//None
  3980. '//
  3981. '//Return Value
  3982. '//Count of the number of layers as a Long.
  3983. '//
  3984. '//See Also
  3985. '//
  3986. '//Coding Example
  3987. '//
  3988. '//Declaration
  3989. Declare Function TCWLayersCount lib "TCAPI11" () As Long
  3990.  
  3991. '//Description
  3992. '//This function will return the layer in the active drawing, requested by the index.
  3993. '//
  3994. '//Input Parameters
  3995. '//None
  3996. '//
  3997. '//Return Value
  3998. '//Handle to the layer as a Long.
  3999. '//
  4000. '//See Also
  4001. '//
  4002. '//Coding Example
  4003. '//
  4004. '//Declaration
  4005. Declare Function TCWLayersAt lib "TCAPI11" ( _ 
  4006.     ByVal Index As Long _ 
  4007. ) As Long
  4008.  
  4009. '//Description
  4010. '//This function will create a new layer in the active drawing.  If the layer
  4011. '//already exits, the settings are overwritten.
  4012. '//
  4013. '//Input Parameters
  4014. '//String lName        name of layer
  4015. '//Integer visible    TRUE if visible
  4016. '//Integer frozen    TRUE if graphics on layer cannot be edited or selected
  4017. '//Integer ReadOnly    TRUE if graphics on layer cannot be edited
  4018. '//Long lColor        color as &H00bbggrr
  4019. '//Long lLineStyle    line style
  4020. '//
  4021. '//Return Value
  4022. '//Layer ID or 0 if layer could not be created.  Use TCWLastErrorGet to
  4023. '//retrieve error string.
  4024. '//    
  4025. '//See Also
  4026. '//TCWLayerDispose
  4027. '//
  4028. '//Coding Example
  4029. '//
  4030. '//Declaration
  4031. Declare Function TCWLayerCreate lib "TCAPI11" ( _ 
  4032.     ByRef lName As String, _ 
  4033.     ByVal visible As Long, _ 
  4034.     ByVal frozen As Long, _ 
  4035.     ByVal readonly As Long, _ 
  4036.     ByVal lColor As Long, _ 
  4037.     ByVal lLineStyle As Long _ 
  4038. ) As Long
  4039.  
  4040. '//Description
  4041. '//This function will delete the layer in the active drawing, requested by the index.
  4042. '//
  4043. '//Input Parameters
  4044. '//Long Index        layer to delete
  4045. '//
  4046. '//Return Value
  4047. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4048. '//error string.
  4049. '//
  4050. '//See Also
  4051. '//
  4052. '//Coding Example
  4053. '//
  4054. '//Declaration
  4055. Declare Function TCWLayerDispose lib "TCAPI11" ( _ 
  4056.     ByVal Index As Long _ 
  4057. ) As Long
  4058.  
  4059. '//Section
  4060. '//LAYERS - Get and Set Property Functions
  4061.  
  4062. '//Description
  4063. '//This function will return the value of the property that has been
  4064. '//requested. This mechanism is being used to get around Enable 3.0
  4065. '//non-support for Variants in DLLs.
  4066. '//
  4067. '//Input Parameters
  4068. '//Long layer                layer id returned from LayerAt
  4069. '//String propertyname        name of property look up
  4070. '//
  4071. '//AVAILABLE PROPERTIES:        DESCRIPTION:
  4072. '//"Color"                    layer color
  4073. '//"Frozen"                    graphics on layer are non editable and non selectable
  4074. '//"LineStyle"                layer line style                        
  4075. '//"Name"                    layer name                
  4076. '//"Readonly"                graphics on layer are read only        
  4077. '//"Visible"                    is layer visible in drawing    
  4078. '//
  4079. '//Return Value
  4080. '//Value of property requested
  4081. '//
  4082. '//AVAILABLE PROPERTIES:        VALUE RETURNED:
  4083. '//"Color"                    &H00bbggrr as a Long
  4084. '//"Frozen"                    -1 if frozen, 0 if not 
  4085. '//"LineStyle"                layer line style as a Long
  4086. '//"Name"                    layer name as a String
  4087. '//"Readonly"                -1 if read only, 0 if not 
  4088. '//"Visible"                    -1 if visible, 0 if not
  4089. '//
  4090. '//See Also
  4091. '//
  4092. '//Coding Example
  4093. '//Dim dActive As Long
  4094. '//Dim count As Long
  4095. '//Dim i As Long
  4096. '//Dim LayerID As Long
  4097. '//Dim LayVar As String
  4098. '//Dim Result As Variant
  4099. '//Sub Main
  4100. '//    LayVar = "c:\imsi\tcw40\Samples\mouse.tcw"
  4101. '//    TCWDrawingOpen "c:\imsi\tcw40\Samples\mouse.tcw"
  4102. '//
  4103. '//    count = TCWLayersCount()
  4104. '//    MsgBox count
  4105. '//    i = 1
  4106. '//    LayVar = "Name"
  4107. '//    Do While (i <> count)
  4108. '//       LayerID = TCWLayersAt(i)
  4109. '//       Result = TCWLayerPropertyGet(LayerID, LayVar)
  4110. '//       MsgBox Result
  4111. '//       i = i + 1
  4112. '//    Loop
  4113. '//    MsgBox "Finished"
  4114. '//
  4115. '//End Sub
  4116. '//
  4117. '//Declaration
  4118. '//Declare Function TCWLayerPropertyGet ( _ 
  4119. '//    ByVal layer As Long, _ 
  4120. '//    ByRef propertyname As String _ 
  4121. '//)As Variant
  4122.  
  4123. '//Description
  4124. '//This function will set the property with the specified value.
  4125. '//
  4126. '//Input Parameters
  4127. '//Long layer                layer id
  4128. '//String propertyname        name of property to modify 
  4129. '//Variant value                value to set to 
  4130. '//
  4131. '//AVAILABLE PROPERTIES:        VALUES:
  4132. '//"Color"                    &H00bbggrr
  4133. '//"Frozen"                    1 to set frozen, 0 to unset
  4134. '//"Linestyle"                Long                    
  4135. '//"Name"                    String                
  4136. '//"Readonly"                1 to set readonly, 0 to unset        
  4137. '//"Visible"                    1 to set visible, 0 to unset     
  4138. '//
  4139. '//Return Value
  4140. '//0 if no errors.  Non-zero if errors.  Use TCWLastErrorGet to retrieve error string.
  4141. '//
  4142. '//See Also
  4143. '//
  4144. '//Coding Example
  4145. '//
  4146. '//Declaration
  4147. '//Declare Function TCWLayerPropertySet ( _
  4148. '//    ByVal layer As Long, _ 
  4149. '//    ByRef propertyname As String, _ 
  4150. '//    ByVal value As Variant
  4151. '//)As Long
  4152.  
  4153.  
  4154.  
  4155. '//Section
  4156. '//FILE I/O - Functions
  4157.  
  4158. '//Description
  4159. '//This function will open a text file for input.
  4160. '//
  4161. '//Input Parameters
  4162. '//String filename        name of file to open for reading.
  4163. '//
  4164. '//Return Value
  4165. '//Handle to the file as a Long.  If return value is 0, use TCWLastErrorGet to 
  4166. '//retrieve error string.
  4167. '//
  4168. '//See Also
  4169. '//TCWCloseInput, TCWReadInput, TCWReadInputToken
  4170. '//
  4171. '//Coding Example
  4172. '//
  4173. '//Declaration
  4174. Declare Function TCWOpenInput lib "TCAPI11" ( _ 
  4175.     ByRef filename As String _ 
  4176. ) As Long
  4177.  
  4178. '//Description
  4179. '//This function reads characters from the input file (fd) until it reaches a:
  4180. '//space, next line, of eof or the max number of characters has been read (256).
  4181. '//
  4182. '//Input Parameters
  4183. '//Long fd                file descriptor returned by TCWOpenInput
  4184. '//String strtext        buffer for data to be read into
  4185. '//
  4186. '//Return Value
  4187. '//0 if no errors
  4188. '//-1 if EOF seen
  4189. '//Non-zero (not -1) if errors.  Use TCWLastErrorGet to retrieve error string.
  4190. '//
  4191. '//See Also
  4192. '//TCWOpenInput, TCWCloseInput, TCWReadInput
  4193. '//
  4194. '//Coding Example
  4195. '//
  4196. '//Declaration
  4197. Declare Function TCWReadInputToken lib "TCAPI11" ( _ 
  4198.     ByVal fd As Long, _ 
  4199.     ByRef bstrtext As String _ 
  4200. ) As Long
  4201.  
  4202. '//Description
  4203. '//This function reads the entire line from the input file (fd) into the buffer pbstrBuffer.
  4204. '//The line separator character is '\n'.  '\r' is ignored.
  4205. '//
  4206. '//Input Parameters
  4207. '//Long    fd            file descriptor returned by TCWOpenInput
  4208. '//String strtext    buffer for data to be read into
  4209. '//
  4210. '//Return Value
  4211. '//0 if no errors
  4212. '//-1 if EOF seen
  4213. '//Non-zero (not -1) if errors.  Use TCWLastErrorGet to retrieve error string.
  4214. '//
  4215. '//See Also
  4216. '//TCWCloseInput, TCWOpenInput, TCWReadInputToken
  4217. '//
  4218. '//Coding Example
  4219. '//
  4220. '//Declaration
  4221. Declare Function TCWReadInput lib "TCAPI11" ( _ 
  4222.     ByVal fd As Long, _ 
  4223.     ByRef bstrtext As String _ 
  4224. ) As Long
  4225.  
  4226. '//Description
  4227. '//This function closes the input file.
  4228. '//
  4229. '//Input Parameters
  4230. '//Long fd            file descriptor returned by TCWOpenInput
  4231. '//
  4232. '//Return Value
  4233. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4234. '//error string.
  4235. '//
  4236. '//See Also
  4237. '//TCWOpenInput, TCWReadInput, TCWReadInputToken
  4238. '//
  4239. '//Coding Example
  4240. '//
  4241. '//Declaration
  4242. Declare Function TCWCloseInput lib "TCAPI11" ( _ 
  4243.     ByVal fd As Long _ 
  4244. ) As Long
  4245.  
  4246. '//Description
  4247. '//This function will open a text file for output.
  4248. '//
  4249. '//Input Parameters
  4250. '//String filename            name of file to open for writing.
  4251. '//
  4252. '//Return Value
  4253. '//Handle to the file as a Long.  If return value is 0, use TCWLastErrorGet to 
  4254. '//retrieve error string.
  4255. '//
  4256. '//See Also
  4257. '//TCWCloseOutput, TCWWriteOutput
  4258. '//
  4259. '//Coding Example
  4260. '//
  4261. '//Declaration
  4262. Declare Function TCWOpenOutput lib "TCAPI11" ( _ 
  4263.     ByRef filename As String _ 
  4264. ) As Long
  4265.  
  4266. '//Description
  4267. '//This function writes the buffer bstrBuffer to the file (fd).
  4268. '//
  4269. '//Input Parameters
  4270. '//Long fd                    file descriptor returned by TCWOpenOutput
  4271. '//String strtext            buffer for data to be read into
  4272. '//
  4273. '//Note that max number of bytes you can write is  0xFFFE (65534).
  4274. '//
  4275. '//Return Value
  4276. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4277. '//error string.
  4278. '//
  4279. '//See Also
  4280. '//TCWCloseOutput, TCWOpenOutput
  4281. '//
  4282. '//Coding Example
  4283. '//
  4284. '//Declaration
  4285. Declare Function TCWWriteOutput lib "TCAPI11" ( _ 
  4286.     ByVal fd As Long, _ 
  4287.     ByRef bstrBuffer As String _ 
  4288. ) As Long
  4289.  
  4290. '//Description
  4291. '//This function closes the output file.
  4292. '//
  4293. '//Input Parameters
  4294. '//Long fd            file descriptor returned by TCWOpenOutput
  4295. '//
  4296. '//Return Value
  4297. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4298. '//error string.
  4299. '//
  4300. '//See Also
  4301. '//TCWOpenOutput, TCWWriteOutput
  4302. '//
  4303. '//Coding Example
  4304. '//
  4305. '//Declaration
  4306. Declare Function TCWCloseOutput lib "TCAPI11" ( _ 
  4307.     ByVal fd As Long _ 
  4308. ) As Long
  4309.  
  4310. '//Section
  4311. '//SCREEN - Mouse to Point Functions
  4312.  
  4313. '//Description
  4314. '//This function will set the vertex to the value of the next mouse pick in the
  4315. '//active viewport. The user should use the left mouse button.  A value will not be
  4316. '//returned until the mouse button is released.
  4317. '//
  4318. '//Input Parameters
  4319. '//Long v                handle to a vertex
  4320. '//String prompt            prompt for user
  4321. '//Long g                handle of a graphic to drag (or NULL)
  4322. '//Long vd                reference to a vertex in the drag graphic (or NULL)
  4323. '//Long os                snap modes which give "magnetic: functionality
  4324. '//Long cursor            1 for arrow, 2 for cross, 3 for ibeam
  4325. '//
  4326. '//Return Value
  4327. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4328. '//error string.
  4329. '//
  4330. '//See Also
  4331. '// TCWVertexFindVertex, TCWVertexFindGraphic
  4332. '//
  4333. '//Coding Example
  4334. '//
  4335. '//Declaration
  4336. Declare Function TCWGetPoint lib "TCAPI11" ( _ 
  4337.     ByVal v As Long, _ 
  4338.     ByVal Prompt As String, _ 
  4339.     ByVal gd As Long, _ 
  4340.     ByVal vd As Long, _ 
  4341.     ByVal osmode As Long, _ 
  4342.     ByVal cursor As Long _ 
  4343. ) As Long
  4344.  
  4345. '//Description
  4346. '//This function will update the supplied vertex's X, Y, and Z coordinates with the
  4347. '//X, Y, and Z coordinates of the closest vertex based on the snap mode used. 
  4348. '//
  4349. '//Input Parameters
  4350. '//Long v            handle to a vertex
  4351. '//Long os            snap modes which are active combination of the following values:
  4352. '//
  4353. '//. .                SNAP_NEARESTPOINT  0x0008
  4354. '//. .                SNAP_MIDPOINT      0x0020
  4355. '//. .                SNAP_CENTER        0x0040
  4356. '//. .                SNAP_QUADRANTPOINT 0x0080
  4357. '//. .                SNAP_ANYPOINT      0x00FC
  4358. '//. .                SNAP_NEARESTENTITY 0x0100 (overrides other snaps)
  4359. '//
  4360. '//Return Value
  4361. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4362. '//error string.  Input parameter is updated to reflect closest vertex.
  4363. '//
  4364. '//See Also
  4365. '//TCWVertexFindGraphic
  4366. '//
  4367. '//Coding Example
  4368. '//
  4369. '//Declaration
  4370. Declare Function TCWVertexFindVertex lib "TCAPI11" ( _ 
  4371.     ByVal v As Long, _ 
  4372.     ByVal osmode As Long _ 
  4373. ) As Long
  4374.  
  4375. '//Description
  4376. '//This function with return the handle to the graphic that is closest to the 
  4377. '//supplied vertex. 
  4378. '//
  4379. '//Input Parameters
  4380. '//Long v            handle to a vertex
  4381. '//
  4382. '//Return Value
  4383. '//0 if no errors.  Non-zero if an error occurred. Use TCWLastErrorGet to retrieve 
  4384. '//error string.
  4385. '//
  4386. '//See Also
  4387. '//TCWVertexFindVertex
  4388. '//
  4389. '//Coding Example
  4390. '//
  4391. '//Declaration
  4392. Declare Function TCWVertexFindGraphic lib "TCAPI11" ( _ 
  4393.     ByVal v As Long _ 
  4394. ) As Long
  4395.  
  4396.